This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 488
Training loop cleaning and commenting for better understanding and further improvements #90
Open
ngarneau
wants to merge
47
commits into
salesforce:master
Choose a base branch
from
ngarneau:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…awd-lstm-lm into training-loop-cleaning
…-lm into training-loop-cleaning
…-lm into training-loop-cleaning
…-lm into training-loop-cleaning
…awd-lstm-lm into training-loop-cleaning
Thanks for the contribution! Before we can merge this, we need @ngarneau to sign the Salesforce.com Contributor License Agreement. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey guys,
I want to add some specific behaviors (like conditional language modeling) to the AWD-LSTM model and to do so I needed to fully understand the training loop as well as the model.
To this end, I re-arranged a couple of parts within the code, simplifying the training loop with callbacks provided by an open source lib that makes this easily affordable.
I also plan to add detailed logging using a specific lib for this (I had Sacred in mind, maybe you would suggest other?) as suggested by the team of AllenNLP (see this). This is mainly for proper debugging and reproducibility.
If you think there should be things done differently please let me know and I will change accordingly.
Here is a list of the callbacks implemented:
I also did a coupled of changes within the model:
Feel free to integrate these changes into your codebase. I think it simplifies a lot the understanding of the training loop and the code that will support further development.
Many thanks for the implementation!