From 4c0a2be4e797fb7b37d99821be6e53ca1d1e8ae8 Mon Sep 17 00:00:00 2001 From: okada Date: Sat, 9 Dec 2023 23:19:42 +0900 Subject: [PATCH] fix for old python --- tests/test_language_model_for_completion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_language_model_for_completion.py b/tests/test_language_model_for_completion.py index 275cb6a..009f808 100644 --- a/tests/test_language_model_for_completion.py +++ b/tests/test_language_model_for_completion.py @@ -1,5 +1,5 @@ from unittest.mock import Mock -from typing import Any +from typing import Any, Dict from transformers import ( AutoTokenizer, @@ -47,7 +47,7 @@ def prepare_inputs_for_generation( self, input_ids: torch.Tensor, **kwargs, - ) -> dict[str, Any]: + ) -> Dict[str, Any]: model_inputs = {"input_ids": input_ids} return model_inputs