Skip to content

Commit

Permalink
rm old code
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Chen committed Dec 13, 2024
1 parent 58092c0 commit 1f3be0b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
15 changes: 1 addition & 14 deletions llmfoundry/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@
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

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__)

Expand Down Expand Up @@ -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:
Expand Down
15 changes: 0 additions & 15 deletions llmfoundry/utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
'StoragePermissionError',
'UCNotEnabledError',
'DeltaTableNotFoundError',
'UCNotFoundError',
]

ALLOWED_RESPONSE_KEYS = {'response', 'completion'}
Expand Down Expand Up @@ -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,
)

0 comments on commit 1f3be0b

Please sign in to comment.