From 3ef2b20eafbad514c3860cc37f2667a5d61b821d Mon Sep 17 00:00:00 2001 From: Milo Cress Date: Thu, 18 Jan 2024 19:22:47 +0000 Subject: [PATCH] used older union operator for legacy support --- llmfoundry/data/finetuning/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llmfoundry/data/finetuning/tasks.py b/llmfoundry/data/finetuning/tasks.py index 94321a2853..86a8724103 100644 --- a/llmfoundry/data/finetuning/tasks.py +++ b/llmfoundry/data/finetuning/tasks.py @@ -60,7 +60,7 @@ def preprocessing_fn(example: Dict) -> Dict[str, str]: PromptResponseDict = Dict[str, str] ChatFormattedDict = Dict[str, List[Dict[str, str]]] -Conversation = PromptResponseDict | ChatFormattedDict +Conversation = Union[PromptResponseDict, ChatFormattedDict] ConversationType = Literal['prompt_response', 'chat'] TokenizedConversation = Dict[str, List[int | str]]