"...resnet50_tensorflow.git" did not exist on "3d9ae6de147325e139c7d1ef452b3389fddc9a53"
Commit 4b0c49a1 authored by Konrad's avatar Konrad
Browse files

linting backward compatibility fix

parent 6f76522a
...@@ -3,7 +3,7 @@ import hashlib ...@@ -3,7 +3,7 @@ import hashlib
import json import json
import logging import logging
import os import os
from typing import List, Optional, Tuple, Type, TypeVar from typing import Dict, List, Optional, Tuple, Type, TypeVar
import transformers import transformers
from sqlitedict import SqliteDict from sqlitedict import SqliteDict
...@@ -114,7 +114,7 @@ class LM(abc.ABC): ...@@ -114,7 +114,7 @@ class LM(abc.ABC):
""" """
pass pass
def apply_chat_template(self, chat_history: list[dict[str, str]]) -> str: def apply_chat_template(self, chat_history: List[Dict[str, str]]) -> str:
""" """
Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM. Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM.
......
...@@ -975,7 +975,7 @@ class ConfigurableTask(Task): ...@@ -975,7 +975,7 @@ class ConfigurableTask(Task):
@staticmethod @staticmethod
def append_target_question( def append_target_question(
labeled_examples: list[dict[str, str]], labeled_examples: List[Dict[str, str]],
question: str, question: str,
fewshot_as_multiturn: bool = False, fewshot_as_multiturn: bool = False,
) -> None: ) -> None:
......
...@@ -2,7 +2,7 @@ import copy ...@@ -2,7 +2,7 @@ import copy
import os import os
from datetime import timedelta from datetime import timedelta
from pathlib import Path from pathlib import Path
from typing import List, Literal, Optional, Tuple, Union from typing import Dict, List, Literal, Optional, Tuple, Union
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
...@@ -1290,7 +1290,7 @@ class HFLM(TemplateLM): ...@@ -1290,7 +1290,7 @@ class HFLM(TemplateLM):
return res return res
def apply_chat_template(self, chat_history: list[dict[str, str]]) -> str: def apply_chat_template(self, chat_history: List[Dict[str, str]]) -> str:
""" """
Method to apply a chat template to a list of chat history between user and model. Method to apply a chat template to a list of chat history between user and model.
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment