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 weight averaging and storing methods in references utils #3352

Merged
merged 4 commits into from
Feb 10, 2021

Conversation

datumbox
Copy link
Contributor

@datumbox datumbox commented Feb 4, 2021

During the training and release of pre-trained models, there were a few methods that I found very useful and I thought to add them in the repo for future reference:

  • average_checkpoints(): Useful for averaging checkpoints. Taken from FairSeq.
  • store_model_weights(): Useful for producing files with pre-trained weights from the checkpoints of training scripts. Adapted from @fmassa's reference script.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Ok with me.

@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #3352 (fc2265c) into master (03fec9c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3352   +/-   ##
=======================================
  Coverage   74.80%   74.80%           
=======================================
  Files         105      105           
  Lines        9716     9716           
  Branches     1561     1561           
=======================================
  Hits         7268     7268           
  Misses       1961     1961           
  Partials      487      487           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03fec9c...fc2265c. Read the comment docs.

@datumbox datumbox merged commit 674e814 into pytorch:master Feb 10, 2021
@datumbox datumbox deleted the references/add_util_methods branch February 10, 2021 14:35
facebook-github-bot pushed a commit that referenced this pull request Feb 12, 2021
Summary:
* Adding the average_checkpoints() method.

* Adding the store_model_weights() method.

Reviewed By: mthrok

Differential Revision: D26422441

fbshipit-source-id: 7737ffb4a10611039e65d1963f83f17fa88339e8
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.

3 participants