Load best model + evaluate best model on devset #11
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.
I've noticed that the model loaded at the end of training differs whether the EarlyStoppingException was raised or not:
I'd like to suggest always loading the best model at the end of the training phase, as well as performing the final evaluation successively on the devset and on the testset (with the best model).
Logs of 2 runs to show you the changes in practice:
Note: I've never tried training without a dev set, so I'm not sure about the comment at the end of the Trainer.train_epochs() function:
https://github.com/OrianeN/PaPie/blob/d23f4a5e95638e74dad640cf7f1d44b896c2fb0e/pie/trainer.py#L429-L430