From 1f3be0b455e3be7874559d4308450017abfdf359 Mon Sep 17 00:00:00 2001 From: Vincent Chen Date: Thu, 12 Dec 2024 16:49:08 -0800 Subject: [PATCH] rm old code --- llmfoundry/utils/config_utils.py | 15 +-------------- llmfoundry/utils/exceptions.py | 15 --------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/llmfoundry/utils/config_utils.py b/llmfoundry/utils/config_utils.py index 1016d46ca9..6f3c4d2212 100644 --- a/llmfoundry/utils/config_utils.py +++ b/llmfoundry/utils/config_utils.py @@ -28,7 +28,6 @@ huggingface_dataset_source, uc_volume_dataset_source, ) -from mlflow.exceptions import MlflowException from omegaconf import MISSING, DictConfig, ListConfig, MissingMandatoryValue from omegaconf import OmegaConf as om from transformers import PretrainedConfig @@ -36,7 +35,6 @@ from llmfoundry.layers_registry import ffns_with_megablocks from llmfoundry.models.utils import init_empty_weights from llmfoundry.registry import config_transforms -from llmfoundry.utils.exceptions import UCNotFoundError log = logging.getLogger(__name__) @@ -798,18 +796,7 @@ def log_dataset_uri(cfg: dict[str, Any]) -> None: if dataset_type == 'delta_table': source = source_class(delta_table_name=path) elif dataset_type == 'hf' or dataset_type == 'uc_volume': - try: - source = source_class(path=path) - except MlflowException as e: - error_str = str(e) - match = re.search( - r'MlflowException:\s+(.*?)\s+does not exist in Databricks Unified Catalog\.', - error_str, - ) - if match: - uc_path = match.group(1) - raise UCNotFoundError(uc_path) - raise + source = source_class(path=path) else: source = source_class(url=path) else: diff --git a/llmfoundry/utils/exceptions.py b/llmfoundry/utils/exceptions.py index 78272101ae..53d3baebfc 100644 --- a/llmfoundry/utils/exceptions.py +++ b/llmfoundry/utils/exceptions.py @@ -33,7 +33,6 @@ 'StoragePermissionError', 'UCNotEnabledError', 'DeltaTableNotFoundError', - 'UCNotFoundError', ] ALLOWED_RESPONSE_KEYS = {'response', 'completion'} @@ -586,17 +585,3 @@ def __init__( volume_name=volume_name, table_name=table_name, ) - - -class UCNotFoundError(UserError): - """Error thrown when the UC passed in training doesn't exist.""" - - def __init__( - self, - path: str, - ) -> None: - message = f'Your data path {path} does not exist. Please double check your UC path' - super().__init__( - message=message, - path=path, - )