Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
YamLyubov committed Jun 4, 2024
1 parent 97c171f commit 884ef62
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions golem/core/tuning/tuner_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def tune(self, graph: DomainGraphForTune, **kwargs) -> Union[DomainGraphForTune,
with self.timer:

# Check source metrics for data
self.init_check(graph)
self.init_check(graph, self.objectives_number > 1)
final_graph = self._tune(graph, **kwargs)
# Validate if optimisation did well
final_graph = self.final_check(final_graph, self.objectives_number > 1)
Expand All @@ -100,6 +100,7 @@ def init_check(self, graph: OptGraph) -> None:
Args:
graph: graph to calculate objective
multi_obj: If optimization was multi objective.
"""
self.log.info('Hyperparameters optimization start: estimation of metric for initial graph')

Expand Down Expand Up @@ -179,8 +180,8 @@ def _multi_obj_final_check(self, tuned_graphs: Sequence[OptGraph]) -> Sequence[O
f'{metrics_formatted}')
else:
self.log.message('Initial metric dominates all found solutions. Return initial graph.')
final_graphs = self.init_graph
self.obtained_metric = self.init_metric
final_graphs = [self.init_graph]
self.obtained_metric = [self.init_metric]
return final_graphs

def get_metric_value(self, graph: OptGraph) -> Union[float, Sequence[float]]:
Expand Down

0 comments on commit 884ef62

Please sign in to comment.