File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
3+ import typing as ty
4+
35from pydra .utils .hash import Cache , register_serializer
46from sklearn .pipeline import Pipeline
57
@@ -100,7 +102,7 @@ def to_instance(clf_info):
100102
101103 train_index , test_index = train_test_split [split_index ]
102104 y = y .ravel ()
103- if type (X [0 ][0 ]) == str :
105+ if type (X [0 ][0 ]) is str :
104106 # it's loaded as bytes, so we need to decode as utf-8
105107 X = np .array ([str .encode (n [0 ]).decode ("utf-8" ) for n in X ])
106108 if permute :
@@ -137,7 +139,7 @@ def calc_metric(output, metrics):
137139def get_feature_importance (
138140 * ,
139141 permute : bool ,
140- model : tuple [Pipeline , list , list ],
142+ model : ty . Tuple [Pipeline , list , list ],
141143 gen_feature_importance : bool = True ,
142144):
143145 """Compute feature importance for the model
You can’t perform that action at this time.
0 commit comments