Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing test cases
  • Loading branch information
Neeratyoy committed Nov 13, 2019
commit 7768ca3c2d87549fbb10503f9bb3fd6a557a49d6
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import sklearn.preprocessing
import sklearn.tree
import sklearn.cluster
from sklearn.impute import SimpleImputer
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import OneHotEncoder, StandardScaler

Expand All @@ -38,7 +37,7 @@
from openml.flows import OpenMLFlow
from openml.flows.functions import assert_flows_equal
from openml.runs.trace import OpenMLRunTrace
from openml.testing import TestBase
from openml.testing import TestBase, SimpleImputer


this_directory = os.path.dirname(os.path.abspath(__file__))
Expand Down Expand Up @@ -1780,8 +1779,9 @@ def test_trim_flow_name(self):
self.assertEqual("weka.IsolationForest",
SklearnExtension.trim_flow_name("weka.IsolationForest"))

@unittest.skipIf(LooseVersion(sklearn.__version__) < "0.20",
reason="SimpleImputer, ColumnTransformer available only after 0.19")
@unittest.skipIf(LooseVersion(sklearn.__version__) < "0.21",
reason="SimpleImputer, ColumnTransformer available only after 0.19 and "
"Pipeline till 0.20 doesn't support indexing and 'passthrough'")
def test_run_on_model_with_empty_steps(self):
from sklearn.compose import ColumnTransformer
# testing 'drop', 'passthrough', None as non-actionable sklearn estimators
Expand Down