-
Notifications
You must be signed in to change notification settings - Fork 204
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
allow to skip loading model weights in build_model() #630
allow to skip loading model weights in build_model() #630
Conversation
This pull request was exported from Phabricator. Differential Revision: D50623772 |
e54c22f
to
2047eca
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
2047eca
to
8aa3b20
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
8aa3b20
to
94f05e4
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
94f05e4
to
b49b8f3
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
b49b8f3
to
2432bd8
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
2432bd8
to
c9e1529
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
c9e1529
to
a3bda06
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
a3bda06
to
b89dfc6
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
Summary: Currently, in runner **build_model()** method, when **eval_only=True**, we always try to load model weights. This is quite restricted in some cases. For example, we may just wanna build a model in eval mode to profile its efficiency, and we have not trained the model or generated the model weights in a checkpoint file. Thus, this diff adds an argument **skip_model_weights** to allow users to skip the loading of model weights. Note, this diff is entirely back-compatible and is NOT expected to break existing implementations. Reviewed By: navsud, wat3rBro Differential Revision: D50623772
b89dfc6
to
a69cb8c
Compare
This pull request was exported from Phabricator. Differential Revision: D50623772 |
This pull request has been merged in f2a0c52. |
Summary:
Currently, in runner build_model() method, when eval_only=True, we always try to load model weights.
This is quite restricted in some cases. For example, we may just wanna build a model in eval mode to profile its efficiency, and we have not trained the model or generated the model weights in a checkpoint file.
Thus, this diff adds an argument skip_model_weights to allow users to skip the loading of model weights.
Note, this diff is entirely back-compatible and is NOT expected to break existing implementations.
Differential Revision: D50623772