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

Updates the SRL model #93

Merged
merged 3 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

### Fixed

- Updated the BERT SRL model to be compatible with the new huggingface tokenizers.
- `CopyNetSeq2Seq` model now works with pretrained transformers.
- A bug with `NextTokenLM` that caused simple gradient interpreters to fail.
- A bug in `training_config` of `qanet` and `bimpm` that used the old version of `regularizer` and `initializer`.
Expand Down
2 changes: 1 addition & 1 deletion allennlp_models/pretrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _load_predictor(archive_file: str, predictor_name: Optional[str] = None) ->

def bert_srl_shi_2019() -> SemanticRoleLabelerPredictor:
predictor = _load_predictor(
"https://storage.googleapis.com/allennlp-public-models/bert-base-srl-2020.03.24.tar.gz"
"https://storage.googleapis.com/allennlp-public-models/bert-base-srl-2020.07.14.tar.gz"
)
return predictor

Expand Down
6 changes: 2 additions & 4 deletions training_config/structured_prediction/bert_base_srl.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
}
},

// "train_data_path": "/net/nfs.corp/allennlp/data/ontonotes/conll-formatted-ontonotes-5.0/data/train",
// "validation_data_path": "/net/nfs.corp/allennlp/data/ontonotes/conll-formatted-ontonotes-5.0/data/development",
"train_data_path": std.extVar("SRL_TRAIN_DATA_PATH"),
"validation_data_path": std.extVar("SRL_VALIDATION_DATA_PATH"),

Expand All @@ -33,16 +35,12 @@

"learning_rate_scheduler": {
"type": "slanted_triangular",
"num_epochs": 15,
"num_steps_per_epoch": 8829,
},
"checkpointer": {
"num_serialized_models_to_keep": 2,
},
"grad_norm": 1.0,
"num_epochs": 15,
"validation_metric": "+f1-measure-overall",
"cuda_device": 0,
},

}