Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
nlp
ahisto-modules
Named Entity Recognition Experiments
Commits
ff8e4281
Commit
ff8e4281
authored
Aug 16, 2022
by
Vít Novotný
Browse files
Increase early stopping patience for training NER models
parent
832adbaa
Pipeline
#146507
passed with stage
in 8 minutes and 38 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ahisto_named_entity_search/default.ini
View file @
ff8e4281
...
...
@@ -99,6 +99,7 @@ save_every_n_steps = 1000
number_of_validation_samples
=
1000
number_of_training_epochs
=
10
schedule
=
fair-sequential-schedule
stopping_patience
=
100
[recognition.FairSequentialSchedule]
maximum_number_of_training_epochs_per_objective
=
1
...
...
ahisto_named_entity_search/recognition/model.py
View file @
ff8e4281
...
...
@@ -34,6 +34,7 @@ class NerModel:
NUM_TRAIN_EPOCHS
=
CONFIG
.
getint
(
'number_of_training_epochs'
)
SCHEDULE_NAME
=
CONFIG
[
'schedule'
]
NUM_VALIDATION_SAMPLES
=
CONFIG
.
getint
(
'number_of_validation_samples'
)
STOPPING_PATIENCE
=
CONFIG
.
getint
(
'stopping_patience'
)
def
__init__
(
self
,
model
:
AutoModelForTokenClassification
):
self
.
model
=
model
...
...
@@ -89,6 +90,7 @@ class NerModel:
stopping_strategy
=
StoppingStrategy
.
FIRST_OBJECTIVE_CONVERGED
,
evaluation_strategy
=
'steps'
,
eval_steps
=
cls
.
EVAL_STEPS
,
stopping_patience
=
cls
.
STOPPING_PATIENCE
,
save_strategy
=
'steps'
,
save_steps
=
cls
.
SAVE_STEPS
,
logging_strategy
=
'steps'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment