Skip to content

Commit

Permalink
use pathlib instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Chen committed Dec 13, 2024
1 parent 1f3be0b commit d453c76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llmfoundry/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import logging
import math
import os
import re
import warnings
from dataclasses import dataclass, fields
from pathlib import Path
from typing import (
Any,
Callable,
Expand Down Expand Up @@ -705,7 +705,7 @@ def _process_data_source(
data_paths (List[Tuple[str, str, str]]): A list of tuples formatted as (data type, path, split)
"""
if source_dataset_path:
source_dataset_path = re.sub(r'/+', '/', source_dataset_path)
source_dataset_path = str(Path(source_dataset_path))
# Check for Delta table
if source_dataset_path and len(source_dataset_path.split('.')) == 3:
data_paths.append(('delta_table', source_dataset_path, true_split))
Expand Down

0 comments on commit d453c76

Please sign in to comment.