Skip to content

Commit

Permalink
Lat fix for Ray HP search (huggingface#6691)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger authored and fabiocapsouza committed Nov 15, 2020
1 parent 621ce9b commit b387c1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ def _objective(trial):
if getattr(self, "objective", None) is None:
metrics = self.evaluate()
self.objective = self.compute_objective(metrics)
if self.hp_search_backend == HPSearchBackend.RAY:
tune.report(objective=self.objective)
return self.objective

if self.hp_search_backend == HPSearchBackend.OPTUNA:
Expand Down

0 comments on commit b387c1b

Please sign in to comment.