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

Romeyn/sampler #10525

Merged
merged 8 commits into from
Sep 25, 2024
Merged

Romeyn/sampler #10525

merged 8 commits into from
Sep 25, 2024

Conversation

akoumpa
Copy link
Member

@akoumpa akoumpa commented Sep 18, 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)


Returns:
MegatronStep: The potentially modified MegatronStep object.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.

Args:
step (MegatronStep): The MegatronStep object representing the current step.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
step (MegatronStep): The MegatronStep object representing the current step.
batch (DataT): The current microbatch of data being processed.
forward_callback (MegatronLossReduction): The callback for loss reduction.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
batch (DataT): The microbatch of data that was processed.
forward_callback (MegatronLossReduction): The callback for loss reduction.
output (Any): The output from the forward pass for this microbatch.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
Args:
step (MegatronStep): The MegatronStep object representing the current step.
microbatch_outputs (List[Any]): A list of outputs from all processed microbatches.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
Args:
step (MegatronStep): The MegatronStep object representing the current step.
microbatch_outputs (List[Any]): A list of outputs from all processed microbatches.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
microbatch_outputs (List[Any]): A list of outputs from all processed microbatches.
loss_reduction (MegatronLossReduction): The object used for loss reduction.
reduced (Union[torch.Tensor, Dict[str, torch.Tensor]]): The final reduced output.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
microbatch_outputs (List[Any]): A list of outputs from all processed microbatches.
reduced (Optional[Union[torch.Tensor, Dict[str, torch.Tensor]]]): The final reduced
output, if available. This may be None for certain configurations or pipeline stages.
"""

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
marcromeyn and others added 7 commits September 24, 2024 20:14
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Alexandros Koumparoulis <[email protected]>
Copy link
Collaborator

@sichu2023 sichu2023 left a comment

Choose a reason for hiding this comment

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

LGTM.

@sichu2023 sichu2023 merged commit e8304d6 into main Sep 25, 2024
153 of 158 checks passed
@sichu2023 sichu2023 deleted the romeyn/sampler branch September 25, 2024 17:15
rachitgarg91 pushed a commit to rachitgarg91/NeMo that referenced this pull request Sep 26, 2024
* Introducing MegatronStep to make things more extensible

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

* Improve megatron callbacks

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

* Some small fixes

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

* Apply isort and black reformatting

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

* remove debg code

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

* add forward_only to forward backward func

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

* add global-batch-sampler support to MegatronStep

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

* Apply isort and black reformatting

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

---------

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Co-authored-by: Marc Romeijn <[email protected]>
Co-authored-by: akoumpa <[email protected]>
Co-authored-by: sichu <[email protected]>
maanug-nv pushed a commit that referenced this pull request Oct 2, 2024
* Introducing MegatronStep to make things more extensible

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

* Improve megatron callbacks

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

* Some small fixes

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

* Apply isort and black reformatting

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

* remove debg code

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

* add forward_only to forward backward func

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

* add global-batch-sampler support to MegatronStep

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

* Apply isort and black reformatting

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

---------

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Co-authored-by: Marc Romeijn <[email protected]>
Co-authored-by: akoumpa <[email protected]>
Co-authored-by: sichu <[email protected]>
monica-sekoyan pushed a commit that referenced this pull request Oct 14, 2024
* Introducing MegatronStep to make things more extensible

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

* Improve megatron callbacks

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

* Some small fixes

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

* Apply isort and black reformatting

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

* remove debg code

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

* add forward_only to forward backward func

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

* add global-batch-sampler support to MegatronStep

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

* Apply isort and black reformatting

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

---------

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Co-authored-by: Marc Romeijn <[email protected]>
Co-authored-by: akoumpa <[email protected]>
Co-authored-by: sichu <[email protected]>
tomlifu pushed a commit to tomlifu/NeMo that referenced this pull request Oct 25, 2024
* Introducing MegatronStep to make things more extensible

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

* Improve megatron callbacks

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

* Some small fixes

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

* Apply isort and black reformatting

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

* remove debg code

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

* add forward_only to forward backward func

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

* add global-batch-sampler support to MegatronStep

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

* Apply isort and black reformatting

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

---------

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Co-authored-by: Marc Romeijn <[email protected]>
Co-authored-by: akoumpa <[email protected]>
Co-authored-by: sichu <[email protected]>
Signed-off-by: Lifu Zhang <[email protected]>
tomlifu pushed a commit to tomlifu/NeMo that referenced this pull request Oct 25, 2024
* Introducing MegatronStep to make things more extensible

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

* Improve megatron callbacks

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

* Some small fixes

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

* Apply isort and black reformatting

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

* remove debg code

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

* add forward_only to forward backward func

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

* add global-batch-sampler support to MegatronStep

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

* Apply isort and black reformatting

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

---------

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Co-authored-by: Marc Romeijn <[email protected]>
Co-authored-by: akoumpa <[email protected]>
Co-authored-by: sichu <[email protected]>
Signed-off-by: Lifu Zhang <[email protected]>
hainan-xv pushed a commit to hainan-xv/NeMo that referenced this pull request Nov 5, 2024
* Introducing MegatronStep to make things more extensible

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

* Improve megatron callbacks

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

* Some small fixes

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

* Apply isort and black reformatting

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

* remove debg code

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

* add forward_only to forward backward func

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

* add global-batch-sampler support to MegatronStep

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

* Apply isort and black reformatting

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

---------

Signed-off-by: Alexandros Koumparoulis <[email protected]>
Signed-off-by: Marc Romeijn <[email protected]>
Signed-off-by: akoumpa <[email protected]>
Co-authored-by: Marc Romeijn <[email protected]>
Co-authored-by: akoumpa <[email protected]>
Co-authored-by: sichu <[email protected]>
Signed-off-by: Hainan Xu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants