Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data loading for DPO and other formats like parquet. #1283

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/axolotl/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,12 @@ def load_split(dataset_cfgs, _cfg):
)
split_datasets.insert(i, ds)
else:
ds_type = get_ds_type(ds_cfg)
ds = load_dataset( # pylint: disable=invalid-name
ds_cfg["path"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little wary of completely removing a working code path. We do t have a lot of test coverage of the various file loading use cases so my confidence this won't break existing use cases is low.

Copy link
Contributor Author

@PhilipMay PhilipMay Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. You are right.
The sft code is much more complicated.
See: https://github.com/OpenAccess-AI-Collective/axolotl/blob/b2a4cb4396922fdd2242981a99e79f8b213ac4a4/src/axolotl/utils/data.py#L292-L376
But how do we fix this issue?
Should the user be forced to use jsonl if he or she wants to use a locale file?

ds_type,
name=ds_cfg["name"],
data_files=ds_cfg["path"],
streaming=False,
split=ds_cfg["split"],
)
split_datasets.insert(i, ds)
Expand Down
Loading