-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[NeMo UX] Support generating datasets using different train/valid/test distributions #9771
Conversation
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
build_kwargs["blend_per_split"] = [ | ||
get_blend_from_list(paths["train"]), | ||
get_blend_from_list(paths["validation"]), | ||
get_blend_from_list(paths["test"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashors1 does get_blend_from_list(paths["train"]) work even when you have multiple data files. For ex: {"train": /datafile1/, /datafile2/}. Also in this case if weights are ignored then is the dataset built with all samples from both /datafile1/ and /datafile2/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, get_blend_from_list(paths["train"])
works when you have multiple paths. You're also able to pass in weights by interleaving them with the paths. For example, the following would work:
paths={
"train": [25, PATH1, 75, PATH2],
"validation": [PATH3, PATH4],
"test": ['1', PATH5],
}
The only time the weights are not used is when limit_val_batches <= 1.0
, in which case we want to return the full validation dataset. In this case, users are expected not to provide weights for the paths.
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @ashors1! Also for future references might be good to document the behavior of the megatron datasets as to what is supported and what is not.
…t distributions (#9771) * support building train/valid/test datasets from separate distributions Signed-off-by: ashors1 <[email protected]> * add minimal test Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * set limit_val_batches for nemo 2 example Signed-off-by: ashors1 <[email protected]> * improve assert statement Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Co-authored-by: ashors1 <[email protected]>
…t distributions (#9771) (#9841) * support building train/valid/test datasets from separate distributions * add minimal test * Apply isort and black reformatting * set limit_val_batches for nemo 2 example * improve assert statement * Apply isort and black reformatting --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Co-authored-by: Anna Shors <[email protected]> Co-authored-by: ashors1 <[email protected]>
…t distributions (NVIDIA#9771) (NVIDIA#9841) * support building train/valid/test datasets from separate distributions * add minimal test * Apply isort and black reformatting * set limit_val_batches for nemo 2 example * improve assert statement * Apply isort and black reformatting --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Co-authored-by: Anna Shors <[email protected]> Co-authored-by: ashors1 <[email protected]> Signed-off-by: Boxiang Wang <[email protected]>
…t distributions (NVIDIA#9771) (NVIDIA#9841) * support building train/valid/test datasets from separate distributions * add minimal test * Apply isort and black reformatting * set limit_val_batches for nemo 2 example * improve assert statement * Apply isort and black reformatting --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Co-authored-by: Anna Shors <[email protected]> Co-authored-by: ashors1 <[email protected]> Signed-off-by: Vivian Chen <[email protected]>
…t distributions (#9771) (#9841) * support building train/valid/test datasets from separate distributions * add minimal test * Apply isort and black reformatting * set limit_val_batches for nemo 2 example * improve assert statement * Apply isort and black reformatting --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Co-authored-by: Anna Shors <[email protected]> Co-authored-by: ashors1 <[email protected]>
…t distributions (NVIDIA#9771) (NVIDIA#9841) * support building train/valid/test datasets from separate distributions * add minimal test * Apply isort and black reformatting * set limit_val_batches for nemo 2 example * improve assert statement * Apply isort and black reformatting --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Co-authored-by: Anna Shors <[email protected]> Co-authored-by: ashors1 <[email protected]> Signed-off-by: Hainan Xu <[email protected]>
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Collection: [Note which collection this PR will affect]
Changelog
Usage
# Add a code snippet demonstrating how to use this
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information