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

disable moe logging to avoid deepseek hang #12168

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

akoumpa
Copy link
Member

@akoumpa akoumpa commented Feb 13, 2025

Important

The Update branch button must only be pressed in very rare occassions.
An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.

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)

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Alexandros Koumparoulis <[email protected]>
@akoumpa akoumpa force-pushed the akoumparouli/disable_aggregate_moe_loss_stats branch from 844f157 to 172d67c Compare February 13, 2025 09:49
Copy link
Contributor

[🤖]: Hi @akoumpa 👋,

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

@akoumpa akoumpa marked this pull request as ready for review February 13, 2025 22:23
@akoumpa akoumpa requested a review from cuichenx February 13, 2025 22:23
cuichenx
cuichenx previously approved these changes Feb 13, 2025
Copy link
Collaborator

@cuichenx cuichenx left a comment

Choose a reason for hiding this comment

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

lgtm

pylint

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Comment on lines +633 to +635
# for loss_name, loss_value in aggregate_moe_loss_stats(loss_scale=1.0).items():
# self.lightning_module.log(
# loss_name, loss_value, prog_bar=True, rank_zero_only=True, batch_size=1)

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

Copilot Autofix AI about 15 hours ago

To fix the problem, we should remove the commented-out code entirely. This will help maintain the clarity and readability of the code. If the code is needed for future reference, it can be documented in a separate file or re-enabled with proper context.

  • Locate the commented-out code in the training_step method.
  • Remove the commented-out lines (lines 633-635) entirely.
  • Ensure that the removal does not affect the functionality of the surrounding code.
Suggested changeset 1
nemo/lightning/pytorch/strategies/megatron_strategy.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/nemo/lightning/pytorch/strategies/megatron_strategy.py b/nemo/lightning/pytorch/strategies/megatron_strategy.py
--- a/nemo/lightning/pytorch/strategies/megatron_strategy.py
+++ b/nemo/lightning/pytorch/strategies/megatron_strategy.py
@@ -632,5 +632,5 @@
                 # TODO(@akoumparouli): loss_scale depends on the GBS.
-            # for loss_name, loss_value in aggregate_moe_loss_stats(loss_scale=1.0).items():
-            #    self.lightning_module.log(
-            #    loss_name, loss_value, prog_bar=True, rank_zero_only=True, batch_size=1)
+
+
+
 
EOF
@@ -632,5 +632,5 @@
# TODO(@akoumparouli): loss_scale depends on the GBS.
# for loss_name, loss_value in aggregate_moe_loss_stats(loss_scale=1.0).items():
# self.lightning_module.log(
# loss_name, loss_value, prog_bar=True, rank_zero_only=True, batch_size=1)




Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@pablo-garay
Copy link
Collaborator

it's only the pylint left, but has the full CI passed

@pablo-garay pablo-garay merged commit 245f97c into main Feb 14, 2025
26 checks passed
@pablo-garay pablo-garay deleted the akoumparouli/disable_aggregate_moe_loss_stats branch February 14, 2025 15:10
ko3n1g pushed a commit that referenced this pull request Feb 14, 2025
* disable moe logging to avoid deepseek hang

Signed-off-by: Alexandros Koumparoulis <[email protected]>

* disable moe logging to avoid deepseek hang

Signed-off-by: Alexandros Koumparoulis <[email protected]>

* Apply isort and black reformatting

Signed-off-by: akoumpa <[email protected]>

* Update megatron_strategy.py

pylint

Signed-off-by: Alexandros Koumparoulis <[email protected]>

---------

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Signed-off-by: Alexandros Koumparoulis <[email protected]>
Co-authored-by: akoumpa <[email protected]>
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.

3 participants