Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ca05c2a4
"...resources/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "4f340c442985c391fa0f59e2f8345b11e9ccae20"
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
Show 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:
...
@@ -324,18 +324,15 @@ class TrainingArguments:
def
__post_init__
(
self
):
def
__post_init__
(
self
):
if
self
.
disable_tqdm
is
None
:
if
self
.
disable_tqdm
is
None
:
self
.
disable_tqdm
=
logger
.
getEffectiveLevel
()
>
logging
.
WARN
self
.
disable_tqdm
=
logger
.
getEffectiveLevel
()
>
logging
.
WARN
if
self
.
evaluate_during_training
is
not
None
:
if
self
.
evaluate_during_training
is
True
:
self
.
evaluation_strategy
=
(
self
.
evaluation_strategy
=
EvaluationStrategy
.
STEPS
EvaluationStrategy
.
STEPS
if
self
.
evaluate_during_training
else
EvaluationStrategy
.
NO
)
warnings
.
warn
(
warnings
.
warn
(
"The `evaluate_during_training` argument is deprecated in favor of `evaluation_strategy` (which has more options)"
,
"The `evaluate_during_training` argument is deprecated in favor of `evaluation_strategy` (which has more options)"
,
FutureWarning
,
FutureWarning
,
)
)
else
:
self
.
evaluation_strategy
=
EvaluationStrategy
(
self
.
evaluation_strategy
)
self
.
evaluation_strategy
=
EvaluationStrategy
(
self
.
evaluation_strategy
)
if
self
.
do_eval
is
None
:
if
self
.
do_eval
is
False
and
self
.
evaluation_strategy
!=
EvaluationStrategy
.
NO
:
self
.
do_eval
=
self
.
evaluation_strategy
!=
EvaluationStrategy
.
NO
self
.
do_eval
=
True
if
self
.
eval_steps
is
None
:
if
self
.
eval_steps
is
None
:
self
.
eval_steps
=
self
.
logging_steps
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