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
8c2384d8
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "195fbbb6cfc6c6279cef6be12b05a53d589b0de8"
Unverified
Commit
8c2384d8
authored
Jul 21, 2021
by
Sylvain Gugger
Committed by
GitHub
Jul 21, 2021
Browse files
Raise warning in HP search when hp is not in args (#12831)
parent
cf0755aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/trainer.py
src/transformers/trainer.py
+2
-1
No files found.
src/transformers/trainer.py
View file @
8c2384d8
...
...
@@ -851,9 +851,10 @@ class Trainer:
for
key
,
value
in
params
.
items
():
if
not
hasattr
(
self
.
args
,
key
):
raise
AttributeError
(
logger
.
warn
(
f
"Trying to set
{
key
}
in the hyperparameter search but there is no corresponding field in `TrainingArguments`."
)
continue
old_attr
=
getattr
(
self
.
args
,
key
,
None
)
# Casting value to the proper type
if
old_attr
is
not
None
:
...
...
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