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

Add more fine-grained performance metrics #11619

Merged
merged 30 commits into from
Jan 23, 2025
Merged

Add more fine-grained performance metrics #11619

merged 30 commits into from
Jan 23, 2025

Conversation

ashors1
Copy link
Collaborator

@ashors1 ashors1 commented Dec 17, 2024

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

  • 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)

@github-actions github-actions bot added the common label Jan 8, 2025
@ashors1 ashors1 marked this pull request as ready for review January 13, 2025 20:36
Copy link
Member

@cspades cspades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, thanks!

maanug-nv
maanug-nv previously approved these changes Jan 14, 2025
Copy link
Collaborator

@maanug-nv maanug-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ashors1 ashors1 added Run CICD and removed Run CICD labels Jan 15, 2025
Signed-off-by: ashors1 <[email protected]>
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jan 15, 2025
Signed-off-by: ashors1 <[email protected]>
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jan 16, 2025
Copy link
Contributor

[🤖]: 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

ananthsub
ananthsub previously approved these changes Jan 17, 2025
nemo/utils/flops_formulas.py Outdated Show resolved Hide resolved
Signed-off-by: ashors1 <[email protected]>
ashors1 and others added 2 commits January 17, 2025 13:42
Signed-off-by: ashors1 <[email protected]>
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jan 17, 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.pytorch.callbacks.progress_printer
nemo/lightning/pytorch/callbacks/progress_printer.py:116:0: C0301: Line too long (124/119) (line-too-long)
nemo/lightning/pytorch/callbacks/progress_printer.py:55:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:65:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:68:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:72:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:76:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:86:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:90:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:94:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:98:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:106:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:110:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:114:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:124:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:153:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:166:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:182:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:195:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:210:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:213:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.pytorch.strategies.megatron_strategy
nemo/lightning/pytorch/strategies/megatron_strategy.py:295:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.utils.exp_manager
nemo/utils/exp_manager.py:372:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:397:0: C0301: Line too long (124/119) (line-too-long)
nemo/utils/exp_manager.py:401:0: C0301: Line too long (122/119) (line-too-long)
nemo/utils/exp_manager.py:406:0: C0301: Line too long (127/119) (line-too-long)
nemo/utils/exp_manager.py:420:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:427:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:428:0: C0301: Line too long (126/119) (line-too-long)
nemo/utils/exp_manager.py:430:0: C0301: Line too long (136/119) (line-too-long)
nemo/utils/exp_manager.py:432:0: C0301: Line too long (139/119) (line-too-long)
nemo/utils/exp_manager.py:442:0: C0301: Line too long (123/119) (line-too-long)
nemo/utils/exp_manager.py:443:0: C0301: Line too long (128/119) (line-too-long)
nemo/utils/exp_manager.py:444:0: C0301: Line too long (132/119) (line-too-long)
nemo/utils/exp_manager.py:445:0: C0301: Line too long (127/119) (line-too-long)
nemo/utils/exp_manager.py:533:0: C0301: Line too long (122/119) (line-too-long)
nemo/utils/exp_manager.py:621:0: C0301: Line too long (208/119) (line-too-long)
nemo/utils/exp_manager.py:622:0: C0301: Line too long (230/119) (line-too-long)
nemo/utils/exp_manager.py:624:0: C0301: Line too long (178/119) (line-too-long)
nemo/utils/exp_manager.py:661:0: C0301: Line too long (136/119) (line-too-long)
nemo/utils/exp_manager.py:796:0: C0301: Line too long (121/119) (line-too-long)
nemo/utils/exp_manager.py:804:0: C0301: Line too long (156/119) (line-too-long)
nemo/utils/exp_manager.py:851:0: C0301: Line too long (141/119) (line-too-long)
nemo/utils/exp_manager.py:859:0: C0301: Line too long (152/119) (line-too-long)
nemo/utils/exp_manager.py:1129:0: C0301: Line too long (142/119) (line-too-long)
nemo/utils/exp_manager.py:1153:0: C0301: Line too long (154/119) (line-too-long)
nemo/utils/exp_manager.py:1219:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:1238:0: C0301: Line too long (123/119) (line-too-long)
nemo/utils/exp_manager.py:1264:0: C0301: Line too long (121/119) (line-too-long)
nemo/utils/exp_manager.py:97:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:112:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:138:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:147:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:156:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:167:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:281:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:284:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:299:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:302:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:305:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:308:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:311:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:314:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:352:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:355:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:358:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:361:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1145:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1246:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1265:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1268:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1284:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.41/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.pytorch.callbacks.progress_printer
nemo/lightning/pytorch/callbacks/progress_printer.py:116:0: C0301: Line too long (124/119) (line-too-long)
nemo/lightning/pytorch/callbacks/progress_printer.py:55:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:65:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:68:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:72:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:76:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:86:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:90:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:94:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:98:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:106:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:110:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:114:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:124:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:153:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:166:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:182:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:195:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:210:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/callbacks/progress_printer.py:213:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.pytorch.strategies.megatron_strategy
nemo/lightning/pytorch/strategies/megatron_strategy.py:295:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.utils.exp_manager
nemo/utils/exp_manager.py:372:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:397:0: C0301: Line too long (124/119) (line-too-long)
nemo/utils/exp_manager.py:401:0: C0301: Line too long (122/119) (line-too-long)
nemo/utils/exp_manager.py:406:0: C0301: Line too long (127/119) (line-too-long)
nemo/utils/exp_manager.py:420:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:427:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:428:0: C0301: Line too long (126/119) (line-too-long)
nemo/utils/exp_manager.py:430:0: C0301: Line too long (136/119) (line-too-long)
nemo/utils/exp_manager.py:432:0: C0301: Line too long (139/119) (line-too-long)
nemo/utils/exp_manager.py:442:0: C0301: Line too long (123/119) (line-too-long)
nemo/utils/exp_manager.py:443:0: C0301: Line too long (128/119) (line-too-long)
nemo/utils/exp_manager.py:444:0: C0301: Line too long (132/119) (line-too-long)
nemo/utils/exp_manager.py:445:0: C0301: Line too long (127/119) (line-too-long)
nemo/utils/exp_manager.py:533:0: C0301: Line too long (122/119) (line-too-long)
nemo/utils/exp_manager.py:621:0: C0301: Line too long (208/119) (line-too-long)
nemo/utils/exp_manager.py:622:0: C0301: Line too long (230/119) (line-too-long)
nemo/utils/exp_manager.py:624:0: C0301: Line too long (178/119) (line-too-long)
nemo/utils/exp_manager.py:661:0: C0301: Line too long (136/119) (line-too-long)
nemo/utils/exp_manager.py:796:0: C0301: Line too long (121/119) (line-too-long)
nemo/utils/exp_manager.py:804:0: C0301: Line too long (156/119) (line-too-long)
nemo/utils/exp_manager.py:851:0: C0301: Line too long (141/119) (line-too-long)
nemo/utils/exp_manager.py:859:0: C0301: Line too long (152/119) (line-too-long)
nemo/utils/exp_manager.py:1129:0: C0301: Line too long (142/119) (line-too-long)
nemo/utils/exp_manager.py:1153:0: C0301: Line too long (154/119) (line-too-long)
nemo/utils/exp_manager.py:1219:0: C0301: Line too long (120/119) (line-too-long)
nemo/utils/exp_manager.py:1238:0: C0301: Line too long (123/119) (line-too-long)
nemo/utils/exp_manager.py:1264:0: C0301: Line too long (121/119) (line-too-long)
nemo/utils/exp_manager.py:97:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:112:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:138:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:147:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:156:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:167:0: C0115: Missing class docstring (missing-class-docstring)
nemo/utils/exp_manager.py:281:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:284:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:299:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:302:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:305:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:308:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:311:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:314:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:352:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:355:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:358:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:361:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1145:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1246:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1265:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1268:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/exp_manager.py:1284:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.41/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!

Copy link
Contributor

[🤖]: 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

@ashors1 ashors1 merged commit f0bf77b into main Jan 23, 2025
212 of 215 checks passed
@ashors1 ashors1 deleted the ashors/megatron-timers branch January 23, 2025 03:03
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.

5 participants