Skip to content

Commit 31147a9

Browse files
committed
fix: fixed type
1 parent 3556b99 commit 31147a9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

autointent/nodes/_optimization/_node_optimizer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ class NodeOptimizer:
2020
"""Node optimizer class."""
2121

2222
def __init__(
23-
self, node_type: NodeType, search_space: list[dict[str, Any]], decision_metric: str, metrics: list[str] = []
23+
self,
24+
node_type: NodeType,
25+
search_space: list[dict[str, Any]],
26+
decision_metric: str,
27+
metrics: list[str] | None = None,
2428
) -> None:
2529
"""
2630
Initialize the node optimizer.
@@ -33,7 +37,7 @@ def __init__(
3337
self.node_info = NODES_INFO[node_type]
3438
self.decision_metric_name = decision_metric
3539

36-
self.metrics = metrics
40+
self.metrics = metrics if metrics is not None else []
3741
self.metrics.append(self.decision_metric_name)
3842

3943
self.modules_search_spaces = search_space # TODO search space validation

0 commit comments

Comments
 (0)