Skip to content

Commit

Permalink
Remove callback (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
YamLyubov authored Dec 27, 2023
1 parent 279bbe8 commit 4d71d55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion golem/core/tuning/optuna_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _tune(self, graph: DomainGraphForTune, show_progress: bool = True) -> \
n_trials=self.iterations,
n_jobs=self.n_jobs,
timeout=remaining_time,
callbacks=[self.early_stopping_callback],
callbacks=[self.early_stopping_callback] if not is_multi_objective else None,
show_progress_bar=show_progress)

if not is_multi_objective:
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tuning/test_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_node_tuning(search_space, graph):
is_multi_objective=True)))])
def test_multi_objective_tuning(search_space, tuner_cls, init_graph, adapter, obj_eval):
init_metric = obj_eval.evaluate(init_graph)
tuner = tuner_cls(obj_eval, search_space, adapter, iterations=20)
tuner = tuner_cls(obj_eval, search_space, adapter, iterations=20, early_stopping_rounds=3)
tuned_graphs = tuner.tune(deepcopy(init_graph), show_progress=False)
for graph in tuned_graphs:
assert type(graph) == type(init_graph)
Expand Down

0 comments on commit 4d71d55

Please sign in to comment.