Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Checkpointing (#269)
Browse files Browse the repository at this point in the history
* num_serialized_models_to_keep is now keep_most_recent_by_count

* Changelog
  • Loading branch information
dirkgr authored May 29, 2021
1 parent 07f1b56 commit 50a0452
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Updated all instances of `sanity_checks` to `confidence_checks`.
- The `num_serialized_models_to_keep` parameter is now called `keep_most_recent_by_count`.

### Added

Expand Down
2 changes: 1 addition & 1 deletion test_fixtures/pair_classification/bimpm/experiment.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
},
"trainer": {
"checkpointer": {
"num_serialized_models_to_keep": 2
"keep_most_recent_by_count": 2
},
"num_epochs": 5,
"patience": 2,
Expand Down
2 changes: 1 addition & 1 deletion test_fixtures/pair_classification/esim/experiment.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
},
"validation_metric": "+accuracy",
"checkpointer": {
"num_serialized_models_to_keep": 2
"keep_most_recent_by_count": 2
},
"num_epochs": 5,
"grad_norm": 10.0,
Expand Down
2 changes: 1 addition & 1 deletion test_fixtures/structured_prediction/srl/bert_srl.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ local bert_model = "epwalsh/bert-xsmall-dummy";
"lr": 0.001
},
"checkpointer": {
"num_serialized_models_to_keep": 1
"keep_most_recent_by_count": 1
},
"num_epochs": 3,
"grad_norm": 10.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ local bert_config = {
"lr": 0.001
},
"checkpointer": {
"num_serialized_models_to_keep": 1
"keep_most_recent_by_count": 1
},
"num_epochs": 3,
"grad_norm": 10.0,
Expand Down
2 changes: 1 addition & 1 deletion training_config/pair_classification/esim.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"lr": 0.0004
},
"checkpointer": {
"num_serialized_models_to_keep": 2,
"keep_most_recent_by_count": 2,
},
"validation_metric": "+accuracy",
"num_epochs": 75,
Expand Down
2 changes: 1 addition & 1 deletion training_config/pair_classification/esim_elmo.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"lr": 0.0004
},
"checkpointer": {
"num_serialized_models_to_keep": 2,
"keep_most_recent_by_count": 2,
},
"validation_metric": "+accuracy",
"num_epochs": 75,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ local bert_model = "bert-base-uncased";
"type": "slanted_triangular",
},
"checkpointer": {
"num_serialized_models_to_keep": 2,
"keep_most_recent_by_count": 2,
},
"grad_norm": 1.0,
"num_epochs": 15,
Expand Down
2 changes: 1 addition & 1 deletion training_config/structured_prediction/srl_elmo.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"patience": 200,
"validation_metric": "+f1-measure-overall",
"checkpointer": {
"num_serialized_models_to_keep": 10,
"keep_most_recent_by_count": 10,
},
"optimizer": {
"type": "adadelta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"patience": 200,
"validation_metric": "+f1-measure-overall",
"checkpointer": {
"num_serialized_models_to_keep": 10,
"keep_most_recent_by_count": 10,
},
"optimizer": {
"type": "adadelta",
Expand Down
2 changes: 1 addition & 1 deletion training_config/tagging/ner.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"lr": 0.001
},
"checkpointer": {
"num_serialized_models_to_keep": 3,
"keep_most_recent_by_count": 3,
},
"validation_metric": "+f1-measure-overall",
"num_epochs": 75,
Expand Down
2 changes: 1 addition & 1 deletion training_config/tagging/ner_elmo.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"lr": 0.001
},
"checkpointer": {
"num_serialized_models_to_keep": 3,
"keep_most_recent_by_count": 3,
},
"validation_metric": "+f1-measure-overall",
"num_epochs": 75,
Expand Down

0 comments on commit 50a0452

Please sign in to comment.