2020-07-22 14:42:59 +03:00
|
|
|
[nlp]
|
|
|
|
lang = null
|
|
|
|
pipeline = []
|
2020-07-25 13:14:28 +03:00
|
|
|
load_vocab_data = true
|
2020-07-22 14:42:59 +03:00
|
|
|
|
|
|
|
[nlp.tokenizer]
|
|
|
|
@tokenizers = "spacy.Tokenizer.v1"
|
|
|
|
|
|
|
|
[nlp.lemmatizer]
|
|
|
|
@lemmatizers = "spacy.Lemmatizer.v1"
|
|
|
|
|
|
|
|
[components]
|
|
|
|
|
|
|
|
# Training hyper-parameters and additional features.
|
|
|
|
[training]
|
|
|
|
# Whether to train on sequences with 'gold standard' sentence boundaries
|
|
|
|
# and tokens. If you set this to true, take care to ensure your run-time
|
|
|
|
# data is passed in sentence-by-sentence via some prior preprocessing.
|
|
|
|
gold_preproc = false
|
|
|
|
# Limitations on training document length or number of examples.
|
|
|
|
max_length = 5000
|
|
|
|
limit = 0
|
|
|
|
# Data augmentation
|
|
|
|
orth_variant_level = 0.0
|
|
|
|
dropout = 0.1
|
|
|
|
# Controls early-stopping. 0 or -1 mean unlimited.
|
|
|
|
patience = 1600
|
|
|
|
max_epochs = 0
|
|
|
|
max_steps = 20000
|
|
|
|
eval_frequency = 200
|
|
|
|
eval_batch_size = 128
|
|
|
|
# Other settings
|
|
|
|
seed = 0
|
|
|
|
accumulate_gradient = 1
|
|
|
|
use_pytorch_for_gpu_memory = false
|
|
|
|
# Control how scores are printed and checkpoints are evaluated.
|
Refactor the Scorer to improve flexibility (#5731)
* Refactor the Scorer to improve flexibility
Refactor the `Scorer` to improve flexibility for arbitrary pipeline
components.
* Individual pipeline components provide their own `evaluate` methods
that score a list of `Example`s and return a dictionary of scores
* `Scorer` is initialized either:
* with a provided pipeline containing components to be scored
* with a default pipeline containing the built-in statistical
components (senter, tagger, morphologizer, parser, ner)
* `Scorer.score` evaluates a list of `Example`s and returns a dictionary
of scores referring to the scores provided by the components in the
pipeline
Significant differences:
* `tags_acc` is renamed to `tag_acc` to be consistent with `token_acc`
and the new `morph_acc`, `pos_acc`, and `lemma_acc`
* Scoring is no longer cumulative: `Scorer.score` scores a list of
examples rather than a single example and does not retain any state
about previously scored examples
* PRF values in the returned scores are no longer multiplied by 100
* Add kwargs to Morphologizer.evaluate
* Create generalized scoring methods in Scorer
* Generalized static scoring methods are added to `Scorer`
* Methods require an attribute (either on Token or Doc) that is
used to key the returned scores
Naming differences:
* `uas`, `las`, and `las_per_type` in the scores dict are renamed to
`dep_uas`, `dep_las`, and `dep_las_per_type`
Scoring differences:
* `Doc.sents` is now scored as spans rather than on sentence-initial
token positions so that `Doc.sents` and `Doc.ents` can be scored with
the same method (this lowers scores since a single incorrect sentence
start results in two incorrect spans)
* Simplify / extend hasattr check for eval method
* Add hasattr check to tokenizer scoring
* Simplify to hasattr check for component scoring
* Reset Example alignment if docs are set
Reset the Example alignment if either doc is set in case the
tokenization has changed.
* Add PRF tokenization scoring for tokens as spans
Add PRF scores for tokens as character spans. The scores are:
* token_acc: # correct tokens / # gold tokens
* token_p/r/f: PRF for (token.idx, token.idx + len(token))
* Add docstring to Scorer.score_tokenization
* Rename component.evaluate() to component.score()
* Update Scorer API docs
* Update scoring for positive_label in textcat
* Fix TextCategorizer.score kwargs
* Update Language.evaluate docs
* Update score names in default config
2020-07-25 13:53:02 +03:00
|
|
|
scores = ["speed", "tag_acc", "dep_uas", "dep_las", "ents_f"]
|
|
|
|
score_weights = {"tag_acc": 0.2, "dep_las": 0.4, "ents_f": 0.4}
|
2020-07-22 14:42:59 +03:00
|
|
|
# These settings are invalid for the transformer models.
|
|
|
|
init_tok2vec = null
|
|
|
|
discard_oversize = false
|
|
|
|
batch_by = "sequences"
|
|
|
|
raw_text = null
|
|
|
|
tag_map = null
|
|
|
|
morph_rules = null
|
|
|
|
base_model = null
|
|
|
|
vectors = null
|
|
|
|
|
|
|
|
[training.batch_size]
|
|
|
|
@schedules = "compounding.v1"
|
|
|
|
start = 1000
|
|
|
|
stop = 1000
|
|
|
|
compound = 1.001
|
|
|
|
|
|
|
|
[training.optimizer]
|
|
|
|
@optimizers = "Adam.v1"
|
|
|
|
beta1 = 0.9
|
|
|
|
beta2 = 0.999
|
|
|
|
L2_is_weight_decay = true
|
|
|
|
L2 = 0.01
|
|
|
|
grad_clip = 1.0
|
|
|
|
use_averages = false
|
|
|
|
eps = 1e-8
|
|
|
|
|
|
|
|
[training.optimizer.learn_rate]
|
|
|
|
@schedules = "warmup_linear.v1"
|
|
|
|
warmup_steps = 250
|
|
|
|
total_steps = 20000
|
|
|
|
initial_rate = 0.001
|
|
|
|
|
|
|
|
[pretraining]
|
|
|
|
max_epochs = 1000
|
|
|
|
min_length = 5
|
|
|
|
max_length = 500
|
|
|
|
dropout = 0.2
|
|
|
|
n_save_every = null
|
|
|
|
batch_size = 3000
|
|
|
|
seed = ${training:seed}
|
|
|
|
use_pytorch_for_gpu_memory = ${training:use_pytorch_for_gpu_memory}
|
|
|
|
tok2vec_model = "components.tok2vec.model"
|
|
|
|
|
|
|
|
[pretraining.objective]
|
|
|
|
type = "characters"
|
|
|
|
n_characters = 4
|
|
|
|
|
|
|
|
[pretraining.optimizer]
|
|
|
|
@optimizers = "Adam.v1"
|
|
|
|
beta1 = 0.9
|
|
|
|
beta2 = 0.999
|
|
|
|
L2_is_weight_decay = true
|
|
|
|
L2 = 0.01
|
|
|
|
grad_clip = 1.0
|
|
|
|
use_averages = true
|
|
|
|
eps = 1e-8
|
|
|
|
learn_rate = 0.001
|