Skip to content

Adding a flag whether to save checkpoint or not.#711

Merged
regisss merged 3 commits into
mainfrom
flag_save_checkpoint
Feb 14, 2024
Merged

Adding a flag whether to save checkpoint or not.#711
regisss merged 3 commits into
mainfrom
flag_save_checkpoint

Conversation

@yeonsily
Copy link
Copy Markdown
Collaborator

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@yeonsily yeonsily requested a review from libinta February 13, 2024 20:12
@yeonsily yeonsily requested a review from regisss as a code owner February 13, 2024 20:12
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@regisss
Copy link
Copy Markdown
Collaborator

regisss commented Feb 14, 2024

Adding the training argument save_strategy="no" should lead to no checkpoint saved no?

@yeonsily
Copy link
Copy Markdown
Collaborator Author

Adding the training argument save_strategy="no" should lead to no checkpoint saved no?

I think they used for different cases.

  1. save_strategy is for saving checkpoint per epoch or per checkpoint step.
    If we set this to 'no', it will still save the last checkpoint at the end of the training.

  2. trainer.save_model() in the script is the one for saving last checkpoint at the end of the training.
    But if save_strategy is not 'no', it may still save checkpoint during the training per epoch or steps.

Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants