Skip to content

adding torchrun elastic params#680

Merged
pacman100 merged 1 commit intohuggingface:mainfrom
pacman100:smangrul/torchrun-additional-args
Sep 6, 2022
Merged

adding torchrun elastic params#680
pacman100 merged 1 commit intohuggingface:mainfrom
pacman100:smangrul/torchrun-additional-args

Conversation

@pacman100
Copy link
Contributor

What does this PR do?

  1. Resolves How to set the torch elastic params (e.g., max_restarts)?  #677
    Run below example script with additional torchrun elastic params as below:
accelerate launch --max_restarts=10 --rdzv_conf="timeout=10" examples/nlp_example.py 

Screenshot 2022-09-05 at 8 54 34 PM

@pacman100 pacman100 requested a review from sgugger September 5, 2022 15:25
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 5, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

It looks like those new fields are not used anywhere afterwards?

@pacman100
Copy link
Contributor Author

It looks like those new fields are not used anywhere afterwards?

Hello, it is being used via below lines:

args = _filter_args(args)

setattr(new_args, key, value)

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for explaining!

@pacman100 pacman100 merged commit 4274a41 into huggingface:main Sep 6, 2022
@pacman100 pacman100 deleted the smangrul/torchrun-additional-args branch September 6, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to set the torch elastic params (e.g., max_restarts)?

3 participants