I have a couple of questions regarding the parameters that we define in the config.cfg file. Although spaCy's docs do try to explain them, I feel that the explanation isn't really descriptive enough and that lots of things are scattered around the docs, making it difficult to find exactly what you need, especially with spaCy v3, (unless I'm looking at wrong parts of the website) which is recent and hence has really less question/answers in the forums.
I'm basically building a Named Entity Recognition (NER) model along with a transformer component. My questions are as follows:
In the following part (same question for
corpora.trainalso), what is the difference betweenmax_lengthandlimit?For
max_lengththe docs say "Limitations on training document length"
Forlimit, the docs say "Limitation on number of training examples"Aren't they both more or less the same thing? I mean I can limit the number of training examples by limiting the document's length itself, right?
[corpora.dev]
@readers = "spacy.Corpus.v1"
path = ${paths.dev}
max_length = 0
gold_preproc = false
limit = 0
augmenter = null
- In the below snippet, what is the meaning of one 'step'? I understand
max_steps=0means infinite steps. But how do I know how many such 'steps' make one epoch? Also how many example sentences are covered in 1 such step?
[training]
train_corpus = "corpora.train"
dev_corpus = "corpora.dev"
seed = ${system.seed}
gpu_allocator = ${system.gpu_allocator}
dropout = 0.1
accumulate_gradient = 1
patience = 1600
max_epochs = 10
max_steps = 0
eval_frequency = 200
frozen_components = []
before_to_disk = null
- How exactly is the
learn_ratebeing modified in the below snippet of code, during the training process? More specifically, what dototal_stepsandwarmup_stepsmean?
[training.optimizer.learn_rate]
@schedules = "warmup_linear.v1"
warmup_steps = 250
total_steps = 200
initial_rate = 0.00005
- Finally, in the CLI output of the training process, What exactly is this '#'? It was mentioned in one of GitHub discussions that "The # column is the number of optimization steps (= batches processed)" , but what exactly is this 1 batch or 'optimization step'? If the training process shows me the scores for after 200 such 'batches' how do I interpret it (as in how many example sentences have been processed till that point)?