Skip to content

Commit

Permalink
allow to load only one datasets (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja authored Nov 10, 2024
1 parent eb9a023 commit 259dfe7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/zeroband/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,10 @@ def _load_datasets(
_ds = ParquetDataset(files=ds_arg["data_files"], tokenizer=tokenizer)
datasets.append(_ds)

ds = InterleaveDataset(datasets=datasets, probabilities=probabilities)
if len(datasets) > 1:
ds = InterleaveDataset(datasets=datasets, probabilities=probabilities)
else:
ds = datasets[0]

logger.info(f"Loaded datasets ({split})")
return ds
Expand Down

0 comments on commit 259dfe7

Please sign in to comment.