Skip to content

Commit

Permalink
Bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
daphne12345 committed Aug 29, 2024
1 parent e556fd4 commit 344bc12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deepcave/plugins/hyperparameter/ablation_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- Ablation_Paths: This class provides a plugin for the visualization of the ablation paths.
"""

from typing import Any, Callable, Dict, List, Union
from typing import Any, Callable, Dict, List, Union, Optional

import math
from io import StringIO
Expand Down Expand Up @@ -318,7 +318,7 @@ def process(run: AbstractRun, inputs: Dict[str, Any]) -> Dict[str, Any]:
RuntimeError
If the number of trees is not specified.
"""
objective: Union[Objective, list[Objective], None] = None
objective: Union[Optional[Objective], list[Optional[Objective]], None] = None
objective = run.get_objective(inputs["objective_id1"])
if inputs["objective_id2"] not in (None, -1):
objective = [objective, run.get_objective(inputs["objective_id2"])]
Expand Down
2 changes: 1 addition & 1 deletion deepcave/plugins/hyperparameter/importances.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def process(run: AbstractRun, inputs: Dict[str, Any]) -> Dict[str, Any]:
If the number of trees is not specified.
If the method is not found.
"""
objective: Union[Objective, list[Objective], None] = None
objective: Union[Optional[Objective], list[Optional[Objective]], None] = None
objective = run.get_objective(inputs["objective_id1"])
if inputs["objective_id2"] not in (None, -1):
objective = [objective, run.get_objective(inputs["objective_id2"])]
Expand Down

0 comments on commit 344bc12

Please sign in to comment.