From c27159be010d820726fd3ce8c73d264c609ab01f Mon Sep 17 00:00:00 2001 From: deepanker13 Date: Fri, 5 Jan 2024 19:30:15 +0530 Subject: [PATCH] removing literal usage as python 3.7 doesn't support it --- sdk/python/kubeflow/storage_init_container/hugging_face.py | 2 -- sdk/python/kubeflow/training/api/training_client.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/python/kubeflow/storage_init_container/hugging_face.py b/sdk/python/kubeflow/storage_init_container/hugging_face.py index 62ace28a86..a238f83ceb 100644 --- a/sdk/python/kubeflow/storage_init_container/hugging_face.py +++ b/sdk/python/kubeflow/storage_init_container/hugging_face.py @@ -1,10 +1,8 @@ from kubeflow.storage_init_container.abstract_model_provider import modelProvider from kubeflow.storage_init_container.abstract_dataset_provider import datasetProvider from dataclasses import dataclass, field -from typing import Literal from urllib.parse import urlparse import json, os -from typing import Dict, Any, Union from datasets import load_dataset from peft import LoraConfig import transformers diff --git a/sdk/python/kubeflow/training/api/training_client.py b/sdk/python/kubeflow/training/api/training_client.py index 2599ac6330..3d59e109fe 100644 --- a/sdk/python/kubeflow/training/api/training_client.py +++ b/sdk/python/kubeflow/training/api/training_client.py @@ -16,7 +16,7 @@ import logging import time import json -from typing import Optional, Callable, List, Dict, Any, Set, Literal, Union +from typing import Optional, Callable, List, Dict, Any, Set, Union import queue from kubernetes import client, config, watch @@ -102,7 +102,7 @@ def train( namespace: str = None, num_workers: int = 1, num_procs_per_worker: int = 1, - storage_config: Dict[Literal["size", "storage_class"], str] = {"size": "10Gi"}, + storage_config: Dict[str, str] = {"size": "10Gi", "storage_class": None}, model_provider_parameters: HuggingFaceModelParams = None, dataset_provider_parameters: Union[HfDatasetParams, S3DatasetParams] = None, train_parameters: HuggingFaceTrainParams = None,