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

Call teardown even when something fails. #9331

Closed
wants to merge 2 commits into from

Conversation

tfogal
Copy link

@tfogal tfogal commented May 28, 2024

What does this PR do ?

Avoid tons of terminal spam such as:

[rank0]:[W528 18:14:19.086678488 ProcessGroupNCCL.cpp:1122] WARNING: process group has NOT been destroyed before it is being destructed. On normal program exit, the application should call destroy_process_group to ensure that any pending NCCL data transfers have finished in this process. In rare cases this process can exit before this point and block the progress of another member of the process group. This constraint has always been present,  but this warning has only been added since PyTorch 2.4

when an error occurs, which can obscure the real error.

Collection: Stable diffusion

Changelog

  • stable diffusion: Clean up process groups after an error occurs.

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?
    • Are any necessary for this?
  • 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:

  • Bugfix

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.

@tfogal tfogal marked this pull request as draft May 28, 2024 18:33
@tfogal tfogal marked this pull request as ready for review May 29, 2024 22:29
Copy link
Contributor

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 Jun 13, 2024
@tfogal
Copy link
Author

tfogal commented Jun 13, 2024

Commenting to kill the stale label.

This really just needs a reviewer. Would be great to know if this is the desired solution; I think I'm seeing the same thing in another model and would replicate this approach there, if so.

If something goes wrong in the training, recent PyTorches start
warning us:

```
[rank0]:[W528 18:14:19.086678488 ProcessGroupNCCL.cpp:1122]
WARNING: process group has NOT been destroyed
before it is being destructed. On normal program exit, the
application should call destroy_process_group to
ensure that any pending NCCL data transfers have finished in this
process. In rare cases this process can
exit before this point and block the progress of another member
of the process group. This constraint has
always been present,  but this warning has only been added since
PyTorch 2.4
```

With the finally clause, we're guaranteed to always properly finish
up our instances and thus this avoids the issue.

Signed-off-by: Tom Fogal <60981+tfogal@users.noreply.github.com>
Signed-off-by: tfogal <tfogal@users.noreply.github.com>
Copy link
Collaborator

@ericharper ericharper 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!

Copy link
Contributor

github-actions bot commented Jul 3, 2024

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 Jul 3, 2024
Copy link
Contributor

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

@github-actions github-actions bot closed this Jul 10, 2024
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.

None yet

3 participants