From 954a95ec5a302fe92d2bd2dd9afb77c68f6e985b Mon Sep 17 00:00:00 2001 From: Philmod Date: Fri, 20 Jan 2023 11:00:50 -0500 Subject: [PATCH 1/2] Remove the PDPBox package which still relies on sklearn --- Dockerfile.tmpl | 1 - tests/test_pdpbox.py | 26 -------------------------- 2 files changed, 27 deletions(-) delete mode 100644 tests/test_pdpbox.py diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 2fd40a29..f7de25c6 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -478,7 +478,6 @@ RUN pip install flashtext && \ pip install pandasql && \ pip install tensorflow_hub && \ pip install jieba && \ - pip install git+https://github.com/SauceCat/PDPbox && \ # ggplot is broken and main repo does not merge and release https://github.com/yhat/ggpy/pull/668 pip install https://github.com/hbasria/ggpy/archive/0.11.5.zip && \ pip install cesium && \ diff --git a/tests/test_pdpbox.py b/tests/test_pdpbox.py deleted file mode 100644 index d820f5b0..00000000 --- a/tests/test_pdpbox.py +++ /dev/null @@ -1,26 +0,0 @@ -import numpy as np -import pandas as pd -from pdpbox import pdp -import unittest -from sklearn.model_selection import train_test_split -from sklearn.tree import DecisionTreeClassifier - -class TestPdpbox(unittest.TestCase): - def test_simple_pdp(self): - # set up data - data = pd.read_csv("/input/tests/data/fifa_2018_stats.csv") - y = (data['Man of the Match'] == "Yes") - feature_names = [i for i in data.columns if data[i].dtype in [np.int64]] - X = data[feature_names] - train_X, val_X, train_y, val_y = train_test_split(X, y, random_state=1) - # Build simple model - tree_model = DecisionTreeClassifier(random_state=0, - max_depth=3).fit(train_X, train_y) - - # Set up pdp as table - pdp_goals = pdp.pdp_isolate(model=tree_model, - dataset=val_X, - model_features=feature_names, - feature='Goal Scored') - # make plot - pdp.pdp_plot(pdp_goals, 'Goal Scored') From 7dd844269fb3cb7179dc0ca73574209ad40209c6 Mon Sep 17 00:00:00 2001 From: Philmod Date: Fri, 20 Jan 2023 14:27:49 -0500 Subject: [PATCH 2/2] pin prophet which test is broken --- Dockerfile.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index f7de25c6..bec2ba93 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -312,7 +312,7 @@ RUN pip install mpld3 && \ pip install pyexcel-ods && \ pip install sklearn-pandas && \ pip install stemming && \ - pip install prophet && \ + pip install prophet==1.1.1 && \ pip install holoviews && \ pip install geoviews && \ pip install hypertools && \