Unverified Commit 483a9450 authored by Ferdinand Schlatt's avatar Ferdinand Schlatt Committed by GitHub
Browse files

call on_train_end when trial is pruned (#16536)

parent 9de70f21
......@@ -991,6 +991,7 @@ class Trainer:
trial.report(self.objective, epoch)
if trial.should_prune():
self.callback_handler.on_train_end(self.args, self.state, self.control)
raise optuna.TrialPruned()
elif self.hp_search_backend == HPSearchBackend.RAY:
from ray import tune
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment