Skip to content

Commit dd2b9ee

Browse files
committed
Fix plotting utils
1 parent a1e361f commit dd2b9ee

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

octopus/diagnostics/_plots.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
from plotly.subplots import make_subplots
88
from sklearn.metrics import confusion_matrix
99

10+
from octopus.types import FIResultLabel
11+
1012

1113
def plot_feature_importance_chart(
1214
df: pd.DataFrame,
1315
*,
1416
outersplit_id: int | str = 0,
1517
task_id: int | str = 0,
1618
training_id: str = "",
17-
fi_method: str = "",
19+
fi_method: str | FIResultLabel = "",
1820
) -> go.Figure:
1921
"""Create a feature importance bar chart.
2022

octopus/diagnostics/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
plot_optuna_trials_chart,
3131
plot_predictions_vs_truth_chart,
3232
)
33-
from octopus.types import MLType
33+
from octopus.types import FIResultLabel, MLType
3434

3535

3636
def _has_ipywidgets() -> bool:
@@ -154,7 +154,7 @@ def plot_feature_importance(
154154
outersplit_id: int | None = None,
155155
task_id: int | None = None,
156156
training_id: str | None = None,
157-
fi_method: str | None = None,
157+
fi_method: str | FIResultLabel | None = None,
158158
) -> None:
159159
"""Plot feature importance bar chart.
160160

0 commit comments

Comments
 (0)