-
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
TPS-free 2D bucket estimation and filtering #11738
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Piotr Żelasko <[email protected]>
Signed-off-by: Piotr Żelasko <[email protected]>
Signed-off-by: Piotr Żelasko <[email protected]>
from lhotse.testing.dummies import DummyManifest, dummy_cut | ||
from nemo.collections.common.data.lhotse.sampling import FixedBucketBatchSizeConstraint2D | ||
from lhotse.testing.dummies import dummy_cut | ||
from lhotse.testing.random import deterministic_rng |
Check notice
Code scanning / CodeQL
Unused import Note test
Signed-off-by: Piotr Żelasko <[email protected]>
Signed-off-by: pzelasko <[email protected]>
Signed-off-by: Piotr Żelasko <[email protected]>
…com/nvidia/nemo into 2d-bucketing-and-tps-improvements-2
filter_2d = BucketingFilter(constraint) | ||
cut = make_cut(duration=2.0, num_tokens=20) | ||
assert filter_2d(cut) == False | ||
assert constraint.select_bucket(constraint.max_seq_len_buckets, cut) == None |
Check notice
Code scanning / CodeQL
Testing equality to None Note test
Signed-off-by: Piotr Żelasko <[email protected]>
Signed-off-by: Piotr Żelasko <[email protected]>
Signed-off-by: Piotr Żelasko <[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
@@ -698,28 +709,32 @@ def make_structured_with_schema_warnings(config: DictConfig | dict) -> DictConfi | |||
if not isinstance(config, DictConfig): | |||
config = DictConfig(config) | |||
|
|||
if config.get("tarred_random_access", False): | |||
logging.warning( | |||
"Option 'tarred_random_access' is deprecated and replaced with 'skip_missing_manifest_entries'.", |
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.
may be also add version from which this would be removed
Signed-off-by: Piotr Zelasko <[email protected]>
Signed-off-by: Piotr Żelasko <[email protected]>
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! |
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! |
What does this PR do ?
Improves the UX of estimating 2D buckets and preparing the training configuration. Key changes:
model.train_ds.bucketing_2d_strict_mode=False
): find any bucket that will fit a given example. That means token-per-second outliers are pushed to buckets with higher durations increasing the padding but reducing the amount of discarded data. Use at your own risk - for the setups I tested it so far with, it may cause training instability (likely due to inclusion of lower-quality data).estimate_duration_bins_2d.py
script.estimate_duration_bins_2d.py
.tarred_random_access
toskip_missing_manifest_entries
and adjusted the logic to reduce CPU memory usage and accelerate loading time.Collection: ASR, TTS, SpeechLLM
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