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

[BUG] Fix build train valid test datasets #8826

Merged
Merged
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
4 changes: 3 additions & 1 deletion paddlenlp/data/causal_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@
# Parse the values.
output = get_datasets_weights_and_num_samples(data_prefix, train_val_test_num_samples)
prefixes, weights, datasets_train_valid_test_num_samples = output
train_num_samples, valid_num_samples, test_num_samples = map(sum, zip(*datasets_train_valid_test_num_samples))
# NOTE: megatron/gpt_dataset.py has been updated. When creating BlendableDataset, we will use the raw train_val_test_num_samples instead of the expanded ones.
# Please refer to https://github.com/NVIDIA/NeMo/blob/72f630d087d45655b1a069dc72debf01dfdbdb2d/nemo/collections/nlp/data/language_modeling/megatron/gpt_dataset.py#L74-L80 for more information
train_num_samples, valid_num_samples, test_num_samples = train_val_test_num_samples

Check warning on line 152 in paddlenlp/data/causal_dataset.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/data/causal_dataset.py#L152

Added line #L152 was not covered by tests

# Build individual datasets.
train_datasets = []
Expand Down
Loading