Uh oh!
There was an error while loading. Please reload this page.
[PyTorch] Tests for loading previously-generated checkpoints - #1899
Conversation
timmoon10
commented
Jun 27, 2025
/te-ci pytorch |
1 similar comment
timmoon10
commented
Jun 30, 2025
/te-ci pytorch |
Signed-off-by: Tim Moon <tmoon@nvidia.com>
| python3 -m pytest -v -s --junitxml=$XML_LOG_DIR/pytest_test_fused_attn.xml $TE_PATH/tests/pytorch/fused_attn/test_fused_attn.py || test_fail "test_fused_attn.py" | ||
| python3 -m pytest -v -s --junitxml=$XML_LOG_DIR/pytest_test_kv_cache.xml $TE_PATH/tests/pytorch/fused_attn/test_kv_cache.py || test_fail "test_kv_cache.py" | ||
| python3 -m pytest -v -s --junitxml=$XML_LOG_DIR/pytest_test_hf_integration.xml $TE_PATH/tests/pytorch/test_hf_integration.py || test_fail "test_hf_integration.py" | ||
| TE_TEST_CHECKPOINT_ARTIFACT_PATH=$TE_PATH/artifacts/tests/pytorch/test_checkpoint python3 -m pytest -v -s --junitxml=$XML_LOG_DIR/pytest_test_checkpoint.xml $TE_PATH/tests/pytorch/test_checkpoint.py || test_fail "test_checkpoint.py" |
There was a problem hiding this comment.
For the CI purposes, this doesn't actually test older checkpoints, right?
There was a problem hiding this comment.
I'm planning on keeping the files in our internal repos and modifying the CI pipeline to install them at this path. Unfortunately, this means non-NVIDIA users won't be able to run the tests themselves.
My original approach was to include the checkpoint files with Git LFS, but that could add some burden for users who don't have Git configured properly. We've had users struggle even with Git submodules, so I don't think it would be worth it to introduce LFS for such a basic test.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Review suggestion from @ksivaman Co-authored-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> Signed-off-by: Tim Moon <4406448+timmoon10@users.noreply.github.com>
ksivaman
commented
Jul 8, 2025
/te-ci pytorch |
yaox12
commented
Jul 10, 2025
@timmoon10@ksivaman This PR caused a CI failure. Can you take a look? |
Description
Some downstream users experienced pain when we merged #1033 because it affected the checkpoint format, namely by adding
_extra_stateto the state dict for theLayerNormandRMSNormmodules. This PR adds tests for loading previously-generated checkpoints withstrict=True. Even if we decide to change the checkpoint format in the future, these tests will make sure that it is a deliberate decision.Note that these tests don't check correctness since that's tested in a few other places:
TransformerEngine/tests/pytorch/test_numerics.py
Line 846 in cc0cb35
TransformerEngine/tests/pytorch/test_fusible_ops.py
Line 1971 in cc0cb35
Type of change
Changes
Checklist: