[ckpt, model] refactor: remove unused helper functions#3879
Open
yaoyu-33 wants to merge 2 commits into
Open
Conversation
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Contributor
Author
|
/ok to test f838e09 |
Contributor
Author
|
Usage evidence for cleanup:
|
Contributor
|
LGTM — clean removal of two unused helpers ( Minor note: the PR body references a local path ( Suggested test casesNo perf tests impacted. |
Contributor
Author
|
/ok to test e059f59 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_tensor_parallel()frommodels/conversion/model_bridge.py._transpose_first_dim()fromtraining/checkpointing.py.src/megatron/bridge,tests,examples,docs, orscripts.Usage evidence
git grep -n "is_tensor_parallel" -- src/megatron/bridge tests examples docs scripts "*.py" "*.md"only found the removed definition.git grep -n "_transpose_first_dim\|num_splits_first" -- src/megatron/bridge tests examples docs scripts "*.py" "*.md"only found the removed private helper.is_tensor_parallel()was not exported frommodels/__init__.pyormodels/conversion/__init__.py.Validation
uv run --no-sync python -m py_compile src/megatron/bridge/models/conversion/model_bridge.py src/megatron/bridge/training/checkpointing.pyuv run --no-project --with ruff ruff check src/megatron/bridge/models/conversion/model_bridge.py src/megatron/bridge/training/checkpointing.pyuv run --no-project --with ruff ruff format --check src/megatron/bridge/models/conversion/model_bridge.py src/megatron/bridge/training/checkpointing.pygit diff --check origin/main...HEADuv run pre-commit run --all-filesis blocked locally becauseuvcannot remove<local uv cache>/git-v0/db/f679917ede501d2dwhile resolvingtransformer-engine @ git+https://github.com/NVIDIA/TransformerEngine.git@release_v2.15(Permission denied).Unit tests were not run locally per dispatcher policy. This cleanup removes unreachable/uncalled helpers only.