-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add "_skipme" option to Lhotse Dataloading #11793
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Monica Sekoyan <[email protected]>
Signed-off-by: monica-sekoyan <[email protected]>
Signed-off-by: Monica Sekoyan <[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.
Please add a unit test
@@ -443,6 +445,14 @@ def get_lhotse_sampler_from_config(config, global_rank, world_size, tokenizer=No | |||
cuts, use_iterable_dataset = read_cutset_from_config(config) | |||
use_iterable_dataset = determine_use_iterable_dataset(use_iterable_dataset, config) | |||
|
|||
if config.drop_skipme: | |||
cuts = cuts.filter(lambda cut: not cut.custom.pop("_skipme", False) if hasattr(cut, "custom") else True) |
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.
cuts = cuts.filter(lambda cut: not cut.custom.pop("_skipme", False) if hasattr(cut, "custom") else True) | |
cuts = cuts.filter(lambda cut: "_skipme" not in cut.custom if hasattr(cut, "custom") else True) |
I suggest the following change: skip whenever this key is present. This would let us adopt the following convention: {"_skipme": "reason for skipping"}
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.
@pzelasko , for consistency in manifest entries wouldn't it be better to have "_skipme" keys for every entry with values "False" or "0" for entries we do not need to skip and "reason for skipping" for entries we need to skip?
Signed-off-by: Monica Sekoyan <[email protected]>
Signed-off-by: monica-sekoyan <[email protected]>
Signed-off-by: Monica Sekoyan <[email protected]>
Signed-off-by: Monica Sekoyan <[email protected]>
Signed-off-by: monica-sekoyan <[email protected]>
Signed-off-by: Monica Sekoyan <[email protected]>
Signed-off-by: Monica Sekoyan <[email protected]>
Signed-off-by: monica-sekoyan <[email protected]>
beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base. Your code was analyzed with PyLint. The following annotations have been identified:
Mitigation guide:
By applying these rules, we reduce the occurance of this message in future. Thank you for improving NeMo's documentation! |
beep boop 🤖: 🚨 The following files must be fixed before merge! Your code was analyzed with PyLint. The following annotations have been identified:
Mitigation guide:
By applying these rules, we reduce the occurance of this message in future. Thank you for improving NeMo's documentation! |
What does this PR do ?
Lhotse Dataloading will ignore samples where "_skipme" is set to 1 if not instructed otherwise with
ds.ignore_skipme=True
Collection: [common]
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