Skip to content

Commit

Permalink
Lat fix for Ray HP search (#6691)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Aug 24, 2020
1 parent 3a7fdd3 commit 8f98faf
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 8f98faf

Please sign in to comment.