8000 Update example scripts by muellerzr · Pull Request #307 · huggingface/accelerate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update example scripts #307

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

Merged
merged 12 commits into from
Apr 4, 2022
Merged

Update example scripts #307

merged 12 commits into from
Apr 4, 2022

Conversation

muellerzr
Copy link
Contributor

Start of updating the example scripts to use both the save/load_state and tracking

@muellerzr muellerzr added the documentation Improvements or additions to documentation label 10000 Apr 4, 2022
@muellerzr muellerzr requested a review from sgugger April 4, 2022 17:05
@HuggingFaceDocBuilderDev
Copy link
HuggingFaceDocBuilderDev commented Apr 4, 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.

Left some comments! I was thinking the base example should be left as is to be as simple as possible, and we could add a "complete_nlp_example" that contains the checkpoint and sharding, so that a reader only wanting a base training loop is not too lost. Wdyt?

@muellerzr muellerzr requested a review from sgugger April 4, 2022 18:55
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.

A couple comments more on the step skipping!

@muellerzr muellerzr requested a review from sgugger April 4, 2022 19:46
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.

LGTM! I think we could add a mention in the examples README on why there are two different scripts for each modality.

@@ -149,10 +149,6 @@ def training_function(config, args):
model, optimizer, train_dataloader, eval_dataloader, lr_scheduler
)

# Instantiate learning rate scheduler after preparing the training dataloader as the prepare method
# may change its length.
lr_scheduler = OneCycleLR(optimizer=optimizer, max_lr=lr, epochs=num_epochs, steps_per_epoch=len(train_dataloader))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch!

@muellerzr muellerzr merged commit 38e6d94 into main Apr 4, 2022
@muellerzr muellerzr deleted the examples branch April 4, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0