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

In train_model(), load the best weights at the end so that the best model (not the last) is evaluated on test-set and returned #1234

Merged
merged 2 commits into from May 17, 2018

Conversation

@janLuke
Copy link
Contributor

commented May 17, 2018

  1. the best model (not the last) is evaluated on the test set if "evaluate_on_test";
    this fixes #1223

  2. the best model (not the last) is returned by the function;
    this is a more natural behaviour and incidentally solves #1192

In train_model(), load the best weights at the end so that:
1. the best model (not the last) is evaluated on the test set if "evaluate_on_test";
this fixes #1223

2. the best model (not the last) is returned by the function;
this is a more natural behaviour and incidentally solves #1192
@murphp15

This comment has been minimized.

Copy link
Contributor

commented May 17, 2018

Looks good.

@nelson-liu nelson-liu merged commit 229361c into allenai:master May 17, 2018

3 checks passed

Pull Requests (AllenNLP) TeamCity build finished
Details
codecov/patch 100% of diff hit (target 90%)
Details
codecov/project 92% (+<1%) compared to 76a5a80
Details
@nelson-liu

This comment has been minimized.

Copy link
Member

commented May 17, 2018

Thanks for the PR @janLuke !

@janLuke

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2018

Glad to contribute! Thank you all for this project :)

@janLuke janLuke deleted the janLuke:evaluate_best_model branch May 29, 2018

gabrielStanovsky pushed a commit to gabrielStanovsky/allennlp that referenced this pull request Sep 7, 2018
In train_model(), load the best weights at the end so that: (allenai#…
…1234)

1. the best model (not the last) is evaluated on the test set if "evaluate_on_test";
this fixes allenai#1223

2. the best model (not the last) is returned by the function;
this is a more natural behaviour and incidentally solves allenai#1192
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.