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 option for mutex timeout in distributed optimizer backward hook #9091

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 2, 2024

What does this PR do ?

Modified version of #9084, to debug a hang at

with self._lock:

Collection: NLP

Changelog

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

Usage

Run GPT, e.g. with the config at https://github.com/NVIDIA/NeMo/blob/main/examples/nlp/language_modeling/conf/megatron_gpt_config.yaml.

Enable the distributed optimizer with model.optim.name=distributed_fused_adam and set the timeout with model.optim.lock_timeout=<seconds>.

Jenkins CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

There's no need to comment jenkins on the PR to trigger Jenkins CI.
The GitHub Actions CI will run automatically when the PR is opened.
To run CI on an untrusted fork, a NeMo user with write access must 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)

…9087)

* Tim: Add option for timeout in distopt callback mutex

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>

* Replace parent's _lock

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>

* Revert "Replace parent's _lock"

This reverts commit 972d1b6.

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>

* Raise RuntimeError when timeout

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>

* Change RuntimeError to print

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>

---------

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
Co-authored-by: Jaemin Choi <jaeminc@nvidia.com>
@github-actions github-actions bot added cherry-pick core Changes to NeMo Core labels May 2, 2024
Copy link
Contributor Author

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions bot added the stale label May 17, 2024
Copy link
Contributor Author

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this May 24, 2024
@michal2409 michal2409 removed the stale label Jun 6, 2024
@michal2409 michal2409 reopened this Jun 6, 2024
@michal2409 michal2409 merged commit 8e7e460 into main Jun 12, 2024
134 of 135 checks passed
@michal2409 michal2409 deleted the cherry-pick-main-b2eccd270dd97e2e947c3a59b2f919cbe11b37d1 branch June 12, 2024 10:50
galv pushed a commit to galv/NeMo that referenced this pull request Jun 13, 2024
…VIDIA#9087) (NVIDIA#9091)

* Tim: Add option for timeout in distopt callback mutex



* Replace parent's _lock



* Revert "Replace parent's _lock"

This reverts commit 972d1b6.



* Raise RuntimeError when timeout



* Change RuntimeError to print



---------

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
Co-authored-by: Jaemin Choi <minitu77@gmail.com>
Co-authored-by: Jaemin Choi <jaeminc@nvidia.com>
Co-authored-by: Michal Futrega <mfutrega@nvidia.com>
Co-authored-by: Pablo Garay <palenq@gmail.com>
JesusPaz pushed a commit to JesusPaz/NeMo that referenced this pull request Jun 18, 2024
…VIDIA#9087) (NVIDIA#9091)

* Tim: Add option for timeout in distopt callback mutex



* Replace parent's _lock



* Revert "Replace parent's _lock"

This reverts commit 972d1b6.



* Raise RuntimeError when timeout



* Change RuntimeError to print



---------

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
Co-authored-by: Jaemin Choi <minitu77@gmail.com>
Co-authored-by: Jaemin Choi <jaeminc@nvidia.com>
Co-authored-by: Michal Futrega <mfutrega@nvidia.com>
Co-authored-by: Pablo Garay <palenq@gmail.com>
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
…VIDIA#9087) (NVIDIA#9091)

* Tim: Add option for timeout in distopt callback mutex



* Replace parent's _lock



* Revert "Replace parent's _lock"

This reverts commit 972d1b6.



* Raise RuntimeError when timeout



* Change RuntimeError to print



---------

Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
Co-authored-by: Jaemin Choi <minitu77@gmail.com>
Co-authored-by: Jaemin Choi <jaeminc@nvidia.com>
Co-authored-by: Michal Futrega <mfutrega@nvidia.com>
Co-authored-by: Pablo Garay <palenq@gmail.com>
@ko3n1g ko3n1g mentioned this pull request Jul 18, 2024
2 tasks
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