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

Updates to enable ultrachat200k #2208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
13 changes: 10 additions & 3 deletions src/sparseml/transformers/finetune/data/data_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ def make_dataset_splits(
train_split = eval_split = predict_split = calib_split = None

if do_train:
if "train" not in tokenized_datasets:
if "train" in tokenized_datasets:
train_split = tokenized_datasets["train"]
elif "train_sft" in tokenized_datasets:
train_split = tokenized_datasets["train_sft"]
else:
raise ValueError("--do_train requires a train dataset")
train_split = tokenized_datasets["train"]
if do_eval:
if "validation" not in tokenized_datasets:
raise ValueError("--do_eval requires a validation dataset")
Expand All @@ -142,7 +145,11 @@ def make_dataset_splits(
if do_oneshot:
calib_split = tokenized_datasets.get("calibration")
if calib_split is None:
if "train" not in tokenized_datasets:
if "train" in tokenized_datasets:
train_split = tokenized_datasets["train"]
elif "train_sft" in tokenized_datasets:
train_split = tokenized_datasets["train_sft"]
else:
raise ValueError("--do_oneshot requires a calibration dataset")
calib_split = tokenized_datasets["train"]

Expand Down
Loading