-
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
Call ckpt_to_weights_subdir
from MegatronCheckpointIO
#10897
Conversation
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: artbataev <[email protected]>
Signed-off-by: ashors1 <[email protected]>
@@ -8,7 +8,7 @@ | |||
from filelock import FileLock, Timeout | |||
from pytorch_lightning.trainer.states import TrainerFn | |||
|
|||
from nemo.lightning.ckpt_utils import ckpt_to_context_subdir, ckpt_to_weights_subdir | |||
from nemo.lightning.ckpt_utils import ckpt_to_context_subdir |
Check notice
Code scanning / CodeQL
Cyclic import Note
nemo.lightning.ckpt_utils
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
Signed-off-by: ashors1 <[email protected]>
[🤖]: Hi @ashors1 👋, 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 I'm just a bot so I'll leave it you what to do next. //cc @pablo-garay @ko3n1g |
Signed-off-by: ashors1 <[email protected]>
@@ -37,7 +37,7 @@ | |||
from torch import nn | |||
from typing_extensions import Self, override | |||
|
|||
from nemo.lightning.ckpt_utils import ckpt_to_dir | |||
from nemo.lightning.ckpt_utils import WEIGHTS_PATH, ckpt_to_dir |
Check notice
Code scanning / CodeQL
Cyclic import Note
nemo.lightning.ckpt_utils
Signed-off-by: Chen Cui <[email protected]>
peft test passed https://github.com/NVIDIA/NeMo/actions/runs/11672168085/job/32500417335 launching full ci now |
[🤖]: Hi @ashors1 👋, 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 I'm just a bot so I'll leave it you what to do next. //cc @pablo-garay @ko3n1g |
* locate weights path within MegatronCheckpointIO Signed-off-by: ashors1 <[email protected]> * small refactor Signed-off-by: ashors1 <[email protected]> * remove another instance of ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * move ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: artbataev <[email protected]> * add weights path in save_checkpoint Signed-off-by: ashors1 <[email protected]> * fix circular import Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * handle saving in ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * fix minor typo Signed-off-by: ashors1 <[email protected]> * bug fixes Signed-off-by: ashors1 <[email protected]> * fix undefined variable Signed-off-by: ashors1 <[email protected]> * move function Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * fix adapter meta file path Signed-off-by: Chen Cui <[email protected]> * Apply isort and black reformatting Signed-off-by: cuichenx <[email protected]> * fix mixtral test Signed-off-by: ashors1 <[email protected]> * fix mixtral test Signed-off-by: ashors1 <[email protected]> * use function for weights subdir Signed-off-by: Chen Cui <[email protected]> * address comments Signed-off-by: ashors1 <[email protected]> * move asserts Signed-off-by: ashors1 <[email protected]> * fix undefined vars Signed-off-by: ashors1 <[email protected]> * bug fix Signed-off-by: ashors1 <[email protected]> --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Signed-off-by: artbataev <[email protected]> Signed-off-by: Chen Cui <[email protected]> Signed-off-by: cuichenx <[email protected]> Co-authored-by: ashors1 <[email protected]> Co-authored-by: artbataev <[email protected]> Co-authored-by: Chen Cui <[email protected]> Co-authored-by: cuichenx <[email protected]>
* locate weights path within MegatronCheckpointIO Signed-off-by: ashors1 <[email protected]> * small refactor Signed-off-by: ashors1 <[email protected]> * remove another instance of ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * move ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: artbataev <[email protected]> * add weights path in save_checkpoint Signed-off-by: ashors1 <[email protected]> * fix circular import Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * handle saving in ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * fix minor typo Signed-off-by: ashors1 <[email protected]> * bug fixes Signed-off-by: ashors1 <[email protected]> * fix undefined variable Signed-off-by: ashors1 <[email protected]> * move function Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * fix adapter meta file path Signed-off-by: Chen Cui <[email protected]> * Apply isort and black reformatting Signed-off-by: cuichenx <[email protected]> * fix mixtral test Signed-off-by: ashors1 <[email protected]> * fix mixtral test Signed-off-by: ashors1 <[email protected]> * use function for weights subdir Signed-off-by: Chen Cui <[email protected]> * address comments Signed-off-by: ashors1 <[email protected]> * move asserts Signed-off-by: ashors1 <[email protected]> * fix undefined vars Signed-off-by: ashors1 <[email protected]> * bug fix Signed-off-by: ashors1 <[email protected]> --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Signed-off-by: artbataev <[email protected]> Signed-off-by: Chen Cui <[email protected]> Signed-off-by: cuichenx <[email protected]> Co-authored-by: ashors1 <[email protected]> Co-authored-by: artbataev <[email protected]> Co-authored-by: Chen Cui <[email protected]> Co-authored-by: cuichenx <[email protected]>
* locate weights path within MegatronCheckpointIO Signed-off-by: ashors1 <[email protected]> * small refactor Signed-off-by: ashors1 <[email protected]> * remove another instance of ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * move ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: artbataev <[email protected]> * add weights path in save_checkpoint Signed-off-by: ashors1 <[email protected]> * fix circular import Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * handle saving in ckpt_to_weights_subdir Signed-off-by: ashors1 <[email protected]> * fix minor typo Signed-off-by: ashors1 <[email protected]> * bug fixes Signed-off-by: ashors1 <[email protected]> * fix undefined variable Signed-off-by: ashors1 <[email protected]> * move function Signed-off-by: ashors1 <[email protected]> * Apply isort and black reformatting Signed-off-by: ashors1 <[email protected]> * fix adapter meta file path Signed-off-by: Chen Cui <[email protected]> * Apply isort and black reformatting Signed-off-by: cuichenx <[email protected]> * fix mixtral test Signed-off-by: ashors1 <[email protected]> * fix mixtral test Signed-off-by: ashors1 <[email protected]> * use function for weights subdir Signed-off-by: Chen Cui <[email protected]> * address comments Signed-off-by: ashors1 <[email protected]> * move asserts Signed-off-by: ashors1 <[email protected]> * fix undefined vars Signed-off-by: ashors1 <[email protected]> * bug fix Signed-off-by: ashors1 <[email protected]> --------- Signed-off-by: ashors1 <[email protected]> Signed-off-by: ashors1 <[email protected]> Signed-off-by: artbataev <[email protected]> Signed-off-by: Chen Cui <[email protected]> Signed-off-by: cuichenx <[email protected]> Co-authored-by: ashors1 <[email protected]> Co-authored-by: artbataev <[email protected]> Co-authored-by: Chen Cui <[email protected]> Co-authored-by: cuichenx <[email protected]>
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Collection: [Note which collection this PR will affect]
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