Repository navigation
Update training dependency compatibility - #16504
Conversation
|
/ok to test b61f739 |
|
/review |
b61f739 to
ebb666e
Compare
|
/ok to test ebb666e |
|
/review |
Signed-off-by: Piotr Żelasko <[email protected]>
ebb666e to
f61055c
Compare
|
/ok to test f61055c |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
The compatibility update is ready within this follow-up review’s scope. I found no unresolved prior finding or newly introduced regression eligible above the historical moderate-impact ceiling.
Since the previous reviewed head, the changes remove the distributed checkpoint backend and its dedicated test while retaining the shared async interfaces. The inspected Experiment Manager and SpeechLM2 paths don’t depend on the removed class. The checkpoint hook edits add comments only. The retained plateau regression still checks synchronous and deferred saves at validation and epoch boundaries, latest versus best checkpoint steps, and scheduling state after finalization. That remains appropriate focused coverage.
The earlier structured-CTC fix remains intact, including the regression that saves the live structured default before normalization. The affected documentation is unchanged and remains consistent with the inspected paths.
I inspected all 27 changed files across three review topics and compared relevant source with the previous reviewed tree. Previously reviewed, unchanged code remained context rather than fresh discovery. This was static review: I didn’t execute tests or independently verify the reported validation. GPU/distributed execution, actual Megatron behavior, and live S3 transfers remain unverified. Sign-off trailers are present, but commit-author identities weren’t supplied for exact DCO comparison.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
Signed-off-by: Piotr Żelasko <[email protected]>
|
/ok to test 3ac3ca0 |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
The compatibility update is ready within this follow-up review’s scope. I found no unresolved prior finding or newly introduced regression eligible above the historical moderate-impact ceiling.
Since the previous reviewed head, the only change is the draft-device regression test. It now covers CPU and meta devices, explicitly moves the enclosing module, and compares its device with the target parameters instead of assuming CPU. I traced it through the constructor and device fallback. The test retains the unset-draft assertion, and the meta case distinguishes the fallback from a hardcoded CPU result. This is appropriate focused coverage for a test-only correction; no documentation change is needed.
The other 27 changed files match the previous reviewed tree. The earlier structured-CTC fix remains intact, including the regression that saves the live structured default before normalization.
I inspected all 28 changed files across three review topics. One delegated report wasn’t returned, so I covered its assigned configuration paths directly. Previously reviewed, unchanged code remained context rather than fresh discovery. This was static review: I didn’t execute tests or independently verify the reported Automodel validation. GPU/distributed execution and live S3 transfers remain unverified. Sign-off trailers are present, but commit-author identities weren’t supplied for exact DCO comparison.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
|
[🤖]: Hi @pzelasko 👋, We wanted to let you know that a CICD pipeline for this PR just finished successfully. So it might be time to merge this PR or get some approvals. |
Signed-off-by: Piotr Żelasko <[email protected]>
|
/ok to test 86bb59f |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
The Hydra/Lightning compatibility update is ready within this follow-up review’s scope. I found no unresolved prior finding or newly introduced regression eligible above the historical moderate-impact ceiling.
Since the previous reviewed head, only two files changed. The summary callback now returns None explicitly, which preserves the previous return value and callback selection. The test imports the helper directly; importing that submodule still initializes nemo.utils and installs the callback adapter. The idempotence assertion and both-namespace callback cases remain intact. Existing tests provide appropriate coverage for this behavior-preserving cleanup, and it needs no documentation change.
The earlier structured-CTC fix remains intact: schema registration follows the definitions, and the regression saves the live structured default before normalization, then checks restricted loading, configuration values, and restored tensors.
I inspected all 28 changed files across three review topics. Whole-file digest comparisons confirm that the other 26 files match the previous reviewed tree. Previously reviewed code remained preservation context rather than fresh discovery. This was static review: I didn’t execute tests, reproduce the combined-PR merge checks, or independently verify the reported validation. GPU/distributed behavior and live S3 transfers remain unverified. Sign-off trailers are present, but commit-author identities weren’t supplied for exact DCO comparison.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
|
[🤖]: Hi @pzelasko 👋, We wanted to let you know that a CICD pipeline for this PR just finished successfully. So it might be time to merge this PR or get some approvals. |
Stack and merge order: #16504 → #16410. This PR targets
main; #16410 targets this branch and adds only EMA tests and documentation.What does this PR do ?
Update Hydra and Lightning compatibility while preserving checkpoint resume and model round trips across the supported speech collections.
Collection: Core, ASR, TTS, Audio, SpeechLM2.
Changelog
>=1.3.8,<1.4, OmegaConf>=2.3,<2.4, and Lightning/PyTorch Lightning>=2.6.6,<2.7; retain locked Hydra 1.3.8 and both Lightning distributions at 2.6.6.save_last=Truecheckpoints at eligible validation/epoch boundaries when the monitored metric plateaus. Update async scheduling state immediately while retaining completion markers and notifications until finalization.Usage
Use the existing installation and training interfaces. Automatic OneLogger registration remains disabled here; its restoration is handled separately in #16255. Keep
create_neptune_logger: falseand use another supported logger.Older checkpoints containing application-defined structured schemas can use explicit source-schema registration as documented in the Experiment Manager guide. New checkpoints store configuration values without those schema types.
GitHub Actions CI
This PR targets
mainindependently of #16255 and is intended to merge first. CI and review are requested for the current published head.Before your PR is "Ready for review"
Pre checks:
PR Type:
Additional Information
Validation with Python 3.13, Hydra 1.3.8, and Lightning/PyTorch Lightning 2.6.6:
CUDA_VISIBLE_DEVICES='' OMP_NUM_THREADS=2 python -m pytest tests/core tests/utils/test_lightning_callback_defaults.py tests/utils/test_trainer_utils.py tests/collections/speechlm2/test_parallel.py tests/collections/common/test_ema.py --cpu -q -m 'not pleasefixme' --timeout=180: 449 passed, 21 skipped, 2 deselected.CUDA_VISIBLE_DEVICES='' OMP_NUM_THREADS=2 NEMO_CACHE_DIR=/tmp/nemo-checkpoint-compat python -m pytest tests/core/test_save_restore.py::TestSaveRestore::test_EncDecCTCModelBPE_v2 --cpu --with_downloads -q --timeout=180: 1 passed, exercising a released ASR checkpoint round trip. One attempt ran out of local disk space; the retry passed after removing obsolete generated HTML.PYTHONPATH=/tmp/speech-dependency-compat CUDA_VISIBLE_DEVICES='' python -m sphinx -b html -W --keep-going docs/source /tmp/lightning-review-docs: passed without warnings.uv run --isolated --no-project --with pylint==4.1.3 pylint --rcfile .pylintrc.<domain> <changed-files>andflake8 --config .flake8.<domain> <changed-files>.python -m pytest tests/core/test_lightning_checkpoint_compatibility.py --cpu -q -m 'not pleasefixme' --timeout=180: 22 passed. Both compatibility hooks include brief comments identifying the Lightning 2.6.0 change. No documentation update is needed for removing an unused backend with no documented Speech workflow.uv lock --check --python python,pre-commit run --from-ref origin/main --to-ref HEAD,git diff --check, and published author/sign-off verification: passed.Coverage includes real Trainer save hooks, AED/adapter model constructors and round trips, live configuration schema preservation, enum/path values, both Lightning namespaces, callback selection with Rich installed, explicit callbacks and disable/barebones flags, synchronous and deferred checkpoint scheduling, resume connectors, and loader-policy forwarding. The callback shim is installed once through NeMo's existing Lightning integration so direct Trainer construction and configuration-helper paths agree.
GPU/distributed runs and live S3 transfers were not run. Deferred I/O, S3 downloads and sharded backend operations use test doubles. Skips include device-, download- and optional-dependency cases; existing marked tests remain excluded. Neptune remains unsupported upstream, OneLogger remains temporarily detached as described above, and explicit restricted-load requests are not silently relaxed.
CI follow-up: make the draft device fallback regression compare against the target device rather than assuming CPU. Cover CPU and meta device moves locally.
CUDA_VISIBLE_DEVICES='' OMP_NUM_THREADS=2 PYTHONPATH=/tmp/nov5-pinned-automodel python -m pytest tests/collections/speechlm2/test_salm_dflash.py --cpu -q -m 'not pleasefixme' --timeout=180: 91 passed, 4 skipped, using Automodel revision309a10098e3ea3d9b79d4b96fa397db40908b751pinned by CI. The old assertion fails for the meta-device regression. An initial full-file run against an older local Automodel checkout had five API-mismatch failures; rerunning with the pinned revision passed. Branch-wide pre-commit and diff checks passed. No production behavior or documentation changed.Review follow-up: make the summary callback return explicit and replace the unused initialization import with the helper exercised by the idempotence test. This PR owns the shared serialization and EMA implementation. #16410 is stacked directly on this branch and contains only its unique EMA tests and documentation; the duplicate implementation has been removed from the child diff.
CUDA_VISIBLE_DEVICES='' OMP_NUM_THREADS=2 python -m pytest tests/utils/test_lightning_callback_defaults.py tests/core/test_lightning_checkpoint_compatibility.py tests/core/test_dependency_compatibility.py --cpu -q -m 'not pleasefixme' --timeout=180: 70 passed on Lightning 2.6.6.tests/collections/common/test_ema_checkpoint_security.py tests/collections/common/test_ema.py. This includes multitask SGD/Adam companion resume and rejection coverage.git merge-treeand an actual no-commit merge completed cleanly; the integrated source has exactly one registration call per CTC/RNNT/multitask module.