Skip to content
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

nemo-ux: deprecate app state #11935

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

akoumpa
Copy link
Member

@akoumpa akoumpa commented Jan 23, 2025

What does this PR do ?

Initial work to deprecate fake_initialize_model_parallel and use mcore's parallel_state directly. By doing so we avoid duplicating code and therefore reduce maintenance overhead.

Collection: [Note which collection this PR will affect]

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

  • You can potentially add a usage example below
# 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:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

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

  • Related to # (issue)

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa akoumpa force-pushed the akoumparouli/deprecate_app_state branch from 12a7848 to 6483ced Compare January 23, 2025 07:34
Signed-off-by: akoumpa <akoumpa@users.noreply.github.com>
@akoumpa akoumpa added Run CICD and removed Run CICD labels Jan 23, 2025
@akoumpa akoumpa changed the title Akoumparouli/deprecate app state nemo-ux: deprecate app state Jan 23, 2025
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa akoumpa removed the Run CICD label Jan 23, 2025
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa akoumpa force-pushed the akoumparouli/deprecate_app_state branch from a27e164 to be8217b Compare January 24, 2025 06:38
@akoumpa akoumpa added Run CICD and removed Run CICD labels Jan 24, 2025
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa akoumpa force-pushed the akoumparouli/deprecate_app_state branch from a81cc94 to 364b5c1 Compare January 24, 2025 06:50
Signed-off-by: akoumpa <akoumpa@users.noreply.github.com>
@akoumpa akoumpa added Run CICD and removed Run CICD labels Jan 24, 2025
Copy link
Contributor

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:

************* Module nemo.lightning._strategy_lib
nemo/lightning/_strategy_lib.py:684:0: C0301: Line too long (130/119) (line-too-long)
nemo/lightning/_strategy_lib.py:36:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/_strategy_lib.py:37:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:117:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:239:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:266:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:302:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:615:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:709:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:722:4: C0115: Missing class docstring (missing-class-docstring)
************* Module nemo.lightning.data
nemo/lightning/data.py:267:0: C0301: Line too long (120/119) (line-too-long)
nemo/lightning/data.py:398:0: C0301: Line too long (134/119) (line-too-long)
nemo/lightning/data.py:399:0: C0301: Line too long (151/119) (line-too-long)
nemo/lightning/data.py:399:0: C0301: Line too long (151/119) (line-too-long)
nemo/lightning/data.py:27:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/data.py:245:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/data.py:313:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/data.py:340:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/data.py:370:0: C0115: Missing class docstring (missing-class-docstring)
************* Module nemo.lightning.pytorch.plugins.data_sampler
nemo/lightning/pytorch/plugins/data_sampler.py:25:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:26:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:29:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:32:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:36:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:89:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:107:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:116:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:128:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:174:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:185:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.pytorch.strategies.megatron_strategy
nemo/lightning/pytorch/strategies/megatron_strategy.py:298:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/megatron_strategy.py:63:0: W0611: Unused init_model_parallel imported from nemo.lightning.pytorch.strategies.utils (unused-import)
nemo/lightning/pytorch/strategies/megatron_strategy.py:63:0: W0611: Unused setup_parallel_ranks imported from nemo.lightning.pytorch.strategies.utils (unused-import)

-----------------------------------
Your code has been rated at 9.66/10

Mitigation guide:

  • Add sensible and useful docstrings to functions and methods
  • For trivial methods like getter/setters, consider adding # pylint: disable=C0116 inside the function itself
  • To disable multiple functions/methods at once, put a # pylint: disable=C0116 before the first and a # pylint: enable=C0116 after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

1 similar comment
Copy link
Contributor

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:

************* Module nemo.lightning._strategy_lib
nemo/lightning/_strategy_lib.py:684:0: C0301: Line too long (130/119) (line-too-long)
nemo/lightning/_strategy_lib.py:36:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/_strategy_lib.py:37:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:117:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:239:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:266:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:302:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:615:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:709:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/_strategy_lib.py:722:4: C0115: Missing class docstring (missing-class-docstring)
************* Module nemo.lightning.data
nemo/lightning/data.py:267:0: C0301: Line too long (120/119) (line-too-long)
nemo/lightning/data.py:398:0: C0301: Line too long (134/119) (line-too-long)
nemo/lightning/data.py:399:0: C0301: Line too long (151/119) (line-too-long)
nemo/lightning/data.py:399:0: C0301: Line too long (151/119) (line-too-long)
nemo/lightning/data.py:27:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/data.py:245:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/data.py:313:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/data.py:340:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/data.py:370:0: C0115: Missing class docstring (missing-class-docstring)
************* Module nemo.lightning.pytorch.plugins.data_sampler
nemo/lightning/pytorch/plugins/data_sampler.py:25:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:26:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:29:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:32:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:36:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:89:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:107:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:116:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:128:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:174:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/plugins/data_sampler.py:185:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.pytorch.strategies.megatron_strategy
nemo/lightning/pytorch/strategies/megatron_strategy.py:298:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/megatron_strategy.py:63:0: W0611: Unused init_model_parallel imported from nemo.lightning.pytorch.strategies.utils (unused-import)
nemo/lightning/pytorch/strategies/megatron_strategy.py:63:0: W0611: Unused setup_parallel_ranks imported from nemo.lightning.pytorch.strategies.utils (unused-import)

-----------------------------------
Your code has been rated at 9.66/10

Mitigation guide:

  • Add sensible and useful docstrings to functions and methods
  • For trivial methods like getter/setters, consider adding # pylint: disable=C0116 inside the function itself
  • To disable multiple functions/methods at once, put a # pylint: disable=C0116 before the first and a # pylint: enable=C0116 after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant