Skip to content

Commit

Permalink
local hf path
Browse files Browse the repository at this point in the history
  • Loading branch information
KuuCi committed Apr 19, 2024
1 parent d472282 commit cbf0c30
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llmfoundry/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def _parse_source_dataset(cfg: DictConfig) -> Set[Tuple[str, str, str]]:
if backend:
hf_path = f'{hf_path.rstrip("/")}/{cfg_split}' if cfg_split else hf_path
data_paths.add((backend, hf_path, data_split))
elif hf_path.startswith('/'):
data_paths.add(('local', hf_path, data_split))
else:
data_paths.add(('hf', hf_path, data_split))
# check for remote path
Expand All @@ -236,6 +238,8 @@ def _parse_source_dataset(cfg: DictConfig) -> Set[Tuple[str, str, str]]:
local_path = data_set['local']
local_path = f'{local_path.rstrip("/")}/{cfg_split}' if cfg_split else local_path
data_paths.add(('local', local_path, data_split))
else:
raise KeyError('DataSource Not Found')

return data_paths

Expand Down

0 comments on commit cbf0c30

Please sign in to comment.