Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ca05c2a4
Unverified
Commit
ca05c2a4
authored
Oct 05, 2020
by
Sylvain Gugger
Committed by
GitHub
Oct 05, 2020
Browse files
Fix post_init of some TrainingArguments (#7525)
parent
3bd3d8b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
src/transformers/training_args.py
src/transformers/training_args.py
+5
-8
No files found.
src/transformers/training_args.py
View file @
ca05c2a4
...
...
@@ -324,18 +324,15 @@ class TrainingArguments:
def
__post_init__
(
self
):
if
self
.
disable_tqdm
is
None
:
self
.
disable_tqdm
=
logger
.
getEffectiveLevel
()
>
logging
.
WARN
if
self
.
evaluate_during_training
is
not
None
:
self
.
evaluation_strategy
=
(
EvaluationStrategy
.
STEPS
if
self
.
evaluate_during_training
else
EvaluationStrategy
.
NO
)
if
self
.
evaluate_during_training
is
True
:
self
.
evaluation_strategy
=
EvaluationStrategy
.
STEPS
warnings
.
warn
(
"The `evaluate_during_training` argument is deprecated in favor of `evaluation_strategy` (which has more options)"
,
FutureWarning
,
)
else
:
self
.
evaluation_strategy
=
EvaluationStrategy
(
self
.
evaluation_strategy
)
if
self
.
do_eval
is
None
:
self
.
do_eval
=
self
.
evaluation_strategy
!=
EvaluationStrategy
.
NO
self
.
evaluation_strategy
=
EvaluationStrategy
(
self
.
evaluation_strategy
)
if
self
.
do_eval
is
False
and
self
.
evaluation_strategy
!=
EvaluationStrategy
.
NO
:
self
.
do_eval
=
True
if
self
.
eval_steps
is
None
:
self
.
eval_steps
=
self
.
logging_steps
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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