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
8f98faf9
"docs/source/vscode:/vscode.git/clone" did not exist on "fb056494e50be6ff729166734eff96f9f26d9e96"
Unverified
Commit
8f98faf9
authored
Aug 24, 2020
by
Sylvain Gugger
Committed by
GitHub
Aug 24, 2020
Browse files
Lat fix for Ray HP search (#6691)
parent
3a7fdd3f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/transformers/trainer.py
src/transformers/trainer.py
+2
-0
No files found.
src/transformers/trainer.py
View file @
8f98faf9
...
@@ -843,6 +843,8 @@ class Trainer:
...
@@ -843,6 +843,8 @@ class Trainer:
if
getattr
(
self
,
"objective"
,
None
)
is
None
:
if
getattr
(
self
,
"objective"
,
None
)
is
None
:
metrics
=
self
.
evaluate
()
metrics
=
self
.
evaluate
()
self
.
objective
=
self
.
compute_objective
(
metrics
)
self
.
objective
=
self
.
compute_objective
(
metrics
)
if
self
.
hp_search_backend
==
HPSearchBackend
.
RAY
:
tune
.
report
(
objective
=
self
.
objective
)
return
self
.
objective
return
self
.
objective
if
self
.
hp_search_backend
==
HPSearchBackend
.
OPTUNA
:
if
self
.
hp_search_backend
==
HPSearchBackend
.
OPTUNA
:
...
...
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