From 3505b671fbdd11d5eecdf3da1f77343b92d5a699 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Thu, 16 May 2024 14:39:57 -0700 Subject: [PATCH 01/26] install test fix --- .github/workflows/install_test.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/install_test.yaml b/.github/workflows/install_test.yaml index 121afc2b71..11b5c2fcfc 100644 --- a/.github/workflows/install_test.yaml +++ b/.github/workflows/install_test.yaml @@ -16,9 +16,6 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] python_version: ["3.9", "3.10", "3.11"] - exclude: - - os: macos-latest - python-version: "3.8" runs-on: ${{ matrix.os }} steps: - name: Checkout repository From ddcc0f2a4419d41c720641793241b4f523f3d82a Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Thu, 16 May 2024 14:42:45 -0700 Subject: [PATCH 02/26] release notes --- docs/source/release_notes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index c64251c024..2fdb1a4f14 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -10,6 +10,7 @@ Release Notes * Testing Changes * Run airflow tests in Python 3.9 :pr:`4391` * Update GH actions to improve handling of potentially unsafe variables :pr:`4417` + * Fix install test :pr:`4423` .. warning:: From 381bd2dfc3bb328021f4953ab1ec1d59a3a0c4cb Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Thu, 16 May 2024 14:44:48 -0700 Subject: [PATCH 03/26] kaleido up --- .github/meta.yaml | 2 +- .../dependency_update_check/latest_dependency_versions.txt | 2 +- evalml/tests/dependency_update_check/minimum_requirements.txt | 2 +- .../tests/dependency_update_check/minimum_test_requirements.txt | 2 +- pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/meta.yaml b/.github/meta.yaml index 909acb4c24..8889025e03 100644 --- a/.github/meta.yaml +++ b/.github/meta.yaml @@ -69,7 +69,7 @@ outputs: run: - '{{ pin_subpackage("evalml-core", max_pin="x.x.x.x") }}' - plotly >=5.0.0 - - python-kaleido ==0.1.0 + - python-kaleido ==0.2.0 - matplotlib-base >=3.3.3 - seaborn >=0.11.1 - ipywidgets >=7.5 diff --git a/evalml/tests/dependency_update_check/latest_dependency_versions.txt b/evalml/tests/dependency_update_check/latest_dependency_versions.txt index 9cd8226313..62216c01b8 100644 --- a/evalml/tests/dependency_update_check/latest_dependency_versions.txt +++ b/evalml/tests/dependency_update_check/latest_dependency_versions.txt @@ -12,7 +12,7 @@ graphviz==0.20.3 holidays==0.20 imbalanced-learn==0.12.2 ipywidgets==8.1.2 -kaleido==0.1.0 +kaleido==0.2.0 lightgbm==4.3.0 lime==0.2.0.1 matplotlib==3.9.0 diff --git a/evalml/tests/dependency_update_check/minimum_requirements.txt b/evalml/tests/dependency_update_check/minimum_requirements.txt index 1e9c2ae224..54f6468579 100644 --- a/evalml/tests/dependency_update_check/minimum_requirements.txt +++ b/evalml/tests/dependency_update_check/minimum_requirements.txt @@ -11,7 +11,7 @@ graphviz==0.13 holidays==0.13 imbalanced-learn==0.11.0 ipywidgets==7.5 -kaleido==0.1.0 +kaleido==0.2.0 lightgbm==4.0.0 lime==0.2.0.1 matplotlib==3.3.3 diff --git a/evalml/tests/dependency_update_check/minimum_test_requirements.txt b/evalml/tests/dependency_update_check/minimum_test_requirements.txt index 382fe8e637..7015c9e5db 100644 --- a/evalml/tests/dependency_update_check/minimum_test_requirements.txt +++ b/evalml/tests/dependency_update_check/minimum_test_requirements.txt @@ -14,7 +14,7 @@ graphviz==0.13 holidays==0.13 imbalanced-learn==0.11.0 ipywidgets==7.5 -kaleido==0.1.0 +kaleido==0.2.0 lightgbm==4.0.0 lime==0.2.0.1 matplotlib==3.3.3 diff --git a/pyproject.toml b/pyproject.toml index 98d7e23c66..f2f98fa58b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ dependencies = [ "nlp-primitives >= 2.9.0", "networkx >= 2.7", "plotly >= 5.0.0", - "kaleido == 0.1.0", + "kaleido == 0.2.0", "ipywidgets >= 7.5", "xgboost >= 1.7.0.post0", "catboost >= 1.1.1", From 9975d03dca9ff47ee609ba3dc9b1ccdca88b07fb Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Fri, 17 May 2024 10:22:54 -0700 Subject: [PATCH 04/26] cap vowpalwabbit --- .github/meta.yaml | 2 +- .../dependency_update_check/latest_dependency_versions.txt | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/meta.yaml b/.github/meta.yaml index 8889025e03..c9fd2b0e23 100644 --- a/.github/meta.yaml +++ b/.github/meta.yaml @@ -81,7 +81,7 @@ outputs: - imbalanced-learn >=0.11.0 - sktime >=0.21.0, <0.29.0 - pmdarima >=1.8.5 - - vowpalwabbit >=8.11.0 + - vowpalwabbit >=8.11.0, <9.9.0 test: imports: - evalml diff --git a/evalml/tests/dependency_update_check/latest_dependency_versions.txt b/evalml/tests/dependency_update_check/latest_dependency_versions.txt index 62216c01b8..da49727573 100644 --- a/evalml/tests/dependency_update_check/latest_dependency_versions.txt +++ b/evalml/tests/dependency_update_check/latest_dependency_versions.txt @@ -34,6 +34,6 @@ sktime==0.28.1 statsmodels==0.14.2 texttable==1.7.0 tomli==2.0.1 -vowpalwabbit==9.9.0 +vowpalwabbit==9.8.0 woodwork==0.31.0 xgboost==2.0.3 diff --git a/pyproject.toml b/pyproject.toml index f2f98fa58b..9676ac9690 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ dependencies = [ "pmdarima >= 1.8.5", "sktime >= 0.21.0, < 0.29.0", "lime >= 0.2.0.1", - "vowpalwabbit >= 8.11.0", + "vowpalwabbit >= 8.11.0", < 9.9.0, "tomli >= 2.0.1", "packaging >= 23.0", "black[jupyter] >= 22.3.0", From 1ee459d5963e62a01ad844a9161463eeeef695aa Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Fri, 17 May 2024 10:24:49 -0700 Subject: [PATCH 05/26] forgot quotes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9676ac9690..0d0e24bbd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ dependencies = [ "pmdarima >= 1.8.5", "sktime >= 0.21.0, < 0.29.0", "lime >= 0.2.0.1", - "vowpalwabbit >= 8.11.0", < 9.9.0, + "vowpalwabbit >= 8.11.0, < 9.9.0", "tomli >= 2.0.1", "packaging >= 23.0", "black[jupyter] >= 22.3.0", From ce422b5944e1a29541ff2eb673c05ac4f41039cb Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Fri, 17 May 2024 10:35:13 -0700 Subject: [PATCH 06/26] add homebrew to try and fix lightgbm --- .github/workflows/install_test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/install_test.yaml b/.github/workflows/install_test.yaml index 11b5c2fcfc..8ad83e1973 100644 --- a/.github/workflows/install_test.yaml +++ b/.github/workflows/install_test.yaml @@ -34,6 +34,11 @@ jobs: with: path: ${{ env.pythonLocation }} key: ${{ matrix.os- }}-${{ matrix.python_version }}-install-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}-v01 + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + - name: Set up cmake and libomp + run: brew install cmake libomp - name: Build evalml package run: make package - name: Install evalml from sdist (not using cache) From b00d604f261d3a999101d5e9740b55282519a0a4 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Fri, 17 May 2024 15:08:33 -0700 Subject: [PATCH 07/26] remove things related to vowpalwabbit --- .github/meta.yaml | 1 - docs/source/api_index.rst | 3 - evalml/pipelines/components/__init__.py | 3 - .../components/estimators/__init__.py | 3 - .../estimators/classifiers/__init__.py | 4 - .../classifiers/vowpal_wabbit_classifiers.py | 129 ------------------ .../estimators/regressors/__init__.py | 3 - .../regressors/vowpal_wabbit_regressor.py | 72 ---------- .../tests/component_tests/test_components.py | 63 --------- .../test_vowpal_wabbit_binary_classifier.py | 81 ----------- ...est_vowpal_wabbit_multiclass_classifier.py | 80 ----------- .../test_vowpal_wabbit_regressor.py | 72 ---------- evalml/tests/conftest.py | 7 - .../latest_dependency_versions.txt | 1 - .../minimum_requirements.txt | 1 - .../minimum_test_requirements.txt | 1 - evalml/utils/gen_utils.py | 3 - pyproject.toml | 1 - 18 files changed, 528 deletions(-) delete mode 100644 evalml/pipelines/components/estimators/classifiers/vowpal_wabbit_classifiers.py delete mode 100644 evalml/pipelines/components/estimators/regressors/vowpal_wabbit_regressor.py delete mode 100644 evalml/tests/component_tests/test_vowpal_wabbit_binary_classifier.py delete mode 100644 evalml/tests/component_tests/test_vowpal_wabbit_multiclass_classifier.py delete mode 100644 evalml/tests/component_tests/test_vowpal_wabbit_regressor.py diff --git a/.github/meta.yaml b/.github/meta.yaml index 909acb4c24..e28140167c 100644 --- a/.github/meta.yaml +++ b/.github/meta.yaml @@ -81,7 +81,6 @@ outputs: - imbalanced-learn >=0.11.0 - sktime >=0.21.0, <0.29.0 - pmdarima >=1.8.5 - - vowpalwabbit >=8.11.0 test: imports: - evalml diff --git a/docs/source/api_index.rst b/docs/source/api_index.rst index f87a4ec0a5..bc0eaac4bc 100644 --- a/docs/source/api_index.rst +++ b/docs/source/api_index.rst @@ -264,8 +264,6 @@ Classifiers are components that output a predicted class label. evalml.pipelines.components.RandomForestClassifier evalml.pipelines.components.StackedEnsembleClassifier evalml.pipelines.components.SVMClassifier - evalml.pipelines.components.VowpalWabbitBinaryClassifier - evalml.pipelines.components.VowpalWabbitMulticlassClassifier evalml.pipelines.components.XGBoostClassifier @@ -290,7 +288,6 @@ Regressors are components that output a predicted target value. evalml.pipelines.components.StackedEnsembleRegressor evalml.pipelines.components.SVMRegressor evalml.pipelines.components.TimeSeriesBaselineEstimator - evalml.pipelines.components.VowpalWabbitRegressor evalml.pipelines.components.XGBoostRegressor diff --git a/evalml/pipelines/components/__init__.py b/evalml/pipelines/components/__init__.py index 605c1e32c2..0f5eeda7ee 100644 --- a/evalml/pipelines/components/__init__.py +++ b/evalml/pipelines/components/__init__.py @@ -30,9 +30,6 @@ ExponentialSmoothingRegressor, ARIMARegressor, VARMAXRegressor, - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, - VowpalWabbitRegressor, ) from evalml.pipelines.components.transformers import ( Transformer, diff --git a/evalml/pipelines/components/estimators/__init__.py b/evalml/pipelines/components/estimators/__init__.py index 057bca0bb6..242f21a241 100644 --- a/evalml/pipelines/components/estimators/__init__.py +++ b/evalml/pipelines/components/estimators/__init__.py @@ -13,8 +13,6 @@ DecisionTreeClassifier, KNeighborsClassifier, SVMClassifier, - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, ) from evalml.pipelines.components.estimators.regressors import ( LinearRegressor, @@ -33,5 +31,4 @@ ARIMARegressor, VARMAXRegressor, ProphetRegressor, - VowpalWabbitRegressor, ) diff --git a/evalml/pipelines/components/estimators/classifiers/__init__.py b/evalml/pipelines/components/estimators/classifiers/__init__.py index 30f96e4013..d7e5080e92 100644 --- a/evalml/pipelines/components/estimators/classifiers/__init__.py +++ b/evalml/pipelines/components/estimators/classifiers/__init__.py @@ -33,7 +33,3 @@ from evalml.pipelines.components.estimators.classifiers.svm_classifier import ( SVMClassifier, ) -from evalml.pipelines.components.estimators.classifiers.vowpal_wabbit_classifiers import ( - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, -) diff --git a/evalml/pipelines/components/estimators/classifiers/vowpal_wabbit_classifiers.py b/evalml/pipelines/components/estimators/classifiers/vowpal_wabbit_classifiers.py deleted file mode 100644 index e8d3929c93..0000000000 --- a/evalml/pipelines/components/estimators/classifiers/vowpal_wabbit_classifiers.py +++ /dev/null @@ -1,129 +0,0 @@ -"""Vowpal Wabbit Classifiers.""" - -from abc import abstractmethod - -from skopt.space import Integer, Real - -from evalml.model_family import ModelFamily -from evalml.pipelines.components.estimators import Estimator -from evalml.problem_types import ProblemTypes -from evalml.utils.gen_utils import import_or_raise - - -class VowpalWabbitBaseClassifier(Estimator): - """Vowpal Wabbit Base Classifier. - - Args: - loss_function (str): Specifies the loss function to use. One of {"squared", "classic", "hinge", "logistic", "quantile"}. Defaults to "logistic". - learning_rate (float): Boosting learning rate. Defaults to 0.5. - decay_learning_rate (float): Decay factor for learning_rate. Defaults to 1.0. - power_t (float): Power on learning rate decay. Defaults to 0.5. - passes (int): Number of training passes. Defaults to 1. - random_seed (int): Seed for the random number generator. Defaults to 0. - """ - - hyperparameter_ranges = { - "loss_function": ["squared", "classic", "hinge", "logistic"], - "learning_rate": Real(0.0000001, 10), - "decay_learning_rate": Real(0.0000001, 1.0), - "power_t": Real(0.01, 1.0), - "passes": Integer(1, 10), - } - """""" - model_family = ModelFamily.VOWPAL_WABBIT - """ModelFamily.VOWPAL_WABBIT""" - _vowpal_wabbit_component = None - - def __init__( - self, - loss_function="logistic", - learning_rate=0.5, - decay_learning_rate=1.0, - power_t=0.5, - passes=1, - random_seed=0, - **kwargs, - ): - parameters = { - "loss_function": loss_function, - "learning_rate": learning_rate, - "decay_learning_rate": decay_learning_rate, - "power_t": power_t, - "passes": passes, - } - parameters.update(kwargs) - vw_class = self._get_component_obj_class() - vw_classifier = vw_class(**parameters) - super().__init__( - parameters=parameters, - component_obj=vw_classifier, - random_seed=random_seed, - ) - - @abstractmethod - def _get_component_obj_class(self): - """Get the appropriate Vowpal Wabbit class.""" - - @property - def feature_importance(self): - """Feature importance for Vowpal Wabbit classifiers. This is not implemented.""" - raise NotImplementedError( - "Feature importance is not implemented for the Vowpal Wabbit classifiers.", - ) - - -class VowpalWabbitBinaryClassifier(VowpalWabbitBaseClassifier): - """Vowpal Wabbit Binary Classifier. - - Args: - loss_function (str): Specifies the loss function to use. One of {"squared", "classic", "hinge", "logistic", "quantile"}. Defaults to "logistic". - learning_rate (float): Boosting learning rate. Defaults to 0.5. - decay_learning_rate (float): Decay factor for learning_rate. Defaults to 1.0. - power_t (float): Power on learning rate decay. Defaults to 0.5. - passes (int): Number of training passes. Defaults to 1. - random_seed (int): Seed for the random number generator. Defaults to 0. - """ - - name = "Vowpal Wabbit Binary Classifier" - supported_problem_types = [ - ProblemTypes.BINARY, - ProblemTypes.TIME_SERIES_BINARY, - ] - """[ - ProblemTypes.BINARY, - ProblemTypes.TIME_SERIES_BINARY, - ]""" - - def _get_component_obj_class(self): - vw_error_msg = "Vowpal Wabbit is not installed. Please install using `pip install vowpalwabbit.`" - vw = import_or_raise("vowpalwabbit", error_msg=vw_error_msg) - vw_classifier = vw.sklearn_vw.VWClassifier - return vw_classifier - - -class VowpalWabbitMulticlassClassifier(VowpalWabbitBaseClassifier): - """Vowpal Wabbit Multiclass Classifier. - - Args: - loss_function (str): Specifies the loss function to use. One of {"squared", "classic", "hinge", "logistic", "quantile"}. Defaults to "logistic". - learning_rate (float): Boosting learning rate. Defaults to 0.5. - decay_learning_rate (float): Decay factor for learning_rate. Defaults to 1.0. - power_t (float): Power on learning rate decay. Defaults to 0.5. - random_seed (int): Seed for the random number generator. Defaults to 0. - """ - - name = "Vowpal Wabbit Multiclass Classifier" - supported_problem_types = [ - ProblemTypes.MULTICLASS, - ProblemTypes.TIME_SERIES_MULTICLASS, - ] - """[ - ProblemTypes.MULTICLASS, - ProblemTypes.TIME_SERIES_MULTICLASS, - ]""" - - def _get_component_obj_class(self): - vw_error_msg = "Vowpal Wabbit is not installed. Please install using `pip install vowpalwabbit.`" - vw = import_or_raise("vowpalwabbit.sklearn_vw", error_msg=vw_error_msg) - vw_classifier = vw.VWMultiClassifier - return vw_classifier diff --git a/evalml/pipelines/components/estimators/regressors/__init__.py b/evalml/pipelines/components/estimators/regressors/__init__.py index c6d36a800d..399682a4e0 100644 --- a/evalml/pipelines/components/estimators/regressors/__init__.py +++ b/evalml/pipelines/components/estimators/regressors/__init__.py @@ -46,6 +46,3 @@ from evalml.pipelines.components.estimators.regressors.varmax_regressor import ( VARMAXRegressor, ) -from evalml.pipelines.components.estimators.regressors.vowpal_wabbit_regressor import ( - VowpalWabbitRegressor, -) diff --git a/evalml/pipelines/components/estimators/regressors/vowpal_wabbit_regressor.py b/evalml/pipelines/components/estimators/regressors/vowpal_wabbit_regressor.py deleted file mode 100644 index 079c6e260a..0000000000 --- a/evalml/pipelines/components/estimators/regressors/vowpal_wabbit_regressor.py +++ /dev/null @@ -1,72 +0,0 @@ -"""Vowpal Wabbit Regressor.""" - -from skopt.space import Integer, Real - -from evalml.model_family import ModelFamily -from evalml.pipelines.components.estimators import Estimator -from evalml.problem_types import ProblemTypes -from evalml.utils.gen_utils import import_or_raise - - -class VowpalWabbitRegressor(Estimator): - """Vowpal Wabbit Regressor. - - Args: - learning_rate (float): Boosting learning rate. Defaults to 0.5. - decay_learning_rate (float): Decay factor for learning_rate. Defaults to 1.0. - power_t (float): Power on learning rate decay. Defaults to 0.5. - passes (int): Number of training passes. Defaults to 1. - random_seed (int): Seed for the random number generator. Defaults to 0. - """ - - name = "Vowpal Wabbit Regressor" - hyperparameter_ranges = { - "learning_rate": Real(0.0000001, 10), - "decay_learning_rate": Real(0.0000001, 1.0), - "power_t": Real(0.01, 1.0), - "passes": Integer(1, 10), - } - """""" - model_family = ModelFamily.VOWPAL_WABBIT - """ModelFamily.VOWPAL_WABBIT""" - supported_problem_types = [ - ProblemTypes.REGRESSION, - ProblemTypes.TIME_SERIES_REGRESSION, - ] - """[ - ProblemTypes.REGRESSION, - ProblemTypes.TIME_SERIES_REGRESSION, - ]""" - - def __init__( - self, - learning_rate=0.5, - decay_learning_rate=1.0, - power_t=0.5, - passes=1, - random_seed=0, - **kwargs, - ): - parameters = { - "learning_rate": learning_rate, - "decay_learning_rate": decay_learning_rate, - "power_t": power_t, - "passes": passes, - } - parameters.update(kwargs) - vw_error_msg = "Vowpal Wabbit is not installed. Please install using `pip install vowpalwabbit.`" - vw = import_or_raise("vowpalwabbit.sklearn_vw", error_msg=vw_error_msg) - vw_regressor_class = vw.VWRegressor - vw_regressor = vw_regressor_class(**parameters) - super().__init__( - parameters=parameters, - component_obj=vw_regressor, - random_seed=random_seed, - ) - - @property - def feature_importance(self): - """Feature importance for Vowpal Wabbit regressor.""" - raise NotImplementedError( - "Feature importance is not implemented for the Vowpal Wabbit regressor.", - ) diff --git a/evalml/tests/component_tests/test_components.py b/evalml/tests/component_tests/test_components.py index 90ec22f5c4..216a7e0f43 100644 --- a/evalml/tests/component_tests/test_components.py +++ b/evalml/tests/component_tests/test_components.py @@ -76,13 +76,6 @@ StackedEnsembleClassifier, StackedEnsembleRegressor, ) -from evalml.pipelines.components.estimators.classifiers.vowpal_wabbit_classifiers import ( - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, -) -from evalml.pipelines.components.estimators.regressors.vowpal_wabbit_regressor import ( - VowpalWabbitRegressor, -) from evalml.pipelines.components.transformers.encoders.label_encoder import LabelEncoder from evalml.pipelines.components.transformers.preprocessing.log_transformer import ( LogTransformer, @@ -525,56 +518,6 @@ def test_describe_component(): } except ImportError: pass - vw_binary_classifier = VowpalWabbitBinaryClassifier( - loss_function="classic", - learning_rate=0.1, - decay_learning_rate=1.0, - power_t=0.1, - passes=1, - ) - vw_multi_classifier = VowpalWabbitMulticlassClassifier( - loss_function="classic", - learning_rate=0.1, - decay_learning_rate=1.0, - power_t=0.1, - passes=1, - ) - vw_regressor = VowpalWabbitRegressor( - learning_rate=0.1, - decay_learning_rate=1.0, - power_t=0.1, - passes=1, - ) - - assert vw_binary_classifier.describe(return_dict=True) == { - "name": "Vowpal Wabbit Binary Classifier", - "parameters": { - "loss_function": "classic", - "learning_rate": 0.1, - "decay_learning_rate": 1.0, - "power_t": 0.1, - "passes": 1, - }, - } - assert vw_multi_classifier.describe(return_dict=True) == { - "name": "Vowpal Wabbit Multiclass Classifier", - "parameters": { - "loss_function": "classic", - "learning_rate": 0.1, - "decay_learning_rate": 1.0, - "power_t": 0.1, - "passes": 1, - }, - } - assert vw_regressor.describe(return_dict=True) == { - "name": "Vowpal Wabbit Regressor", - "parameters": { - "learning_rate": 0.1, - "decay_learning_rate": 1.0, - "power_t": 0.1, - "passes": 1, - }, - } def test_update_parameters(X_y_binary): @@ -1215,9 +1158,6 @@ def test_all_estimators_check_fit( StackedEnsembleRegressor, TimeSeriesBaselineEstimator, MultiseriesTimeSeriesBaselineRegressor, - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, - VowpalWabbitRegressor, ] ] + [test_estimator_needs_fitting_false] for component_class in estimators_to_check: @@ -1399,9 +1339,6 @@ def test_serialization( ( StackedEnsembleClassifier, StackedEnsembleRegressor, - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, - VowpalWabbitRegressor, TimeSeriesBaselineEstimator, ), ) diff --git a/evalml/tests/component_tests/test_vowpal_wabbit_binary_classifier.py b/evalml/tests/component_tests/test_vowpal_wabbit_binary_classifier.py deleted file mode 100644 index 934e49ba51..0000000000 --- a/evalml/tests/component_tests/test_vowpal_wabbit_binary_classifier.py +++ /dev/null @@ -1,81 +0,0 @@ -import numpy as np -import pytest - -from evalml.model_family import ModelFamily -from evalml.pipelines.components.estimators.classifiers import ( - VowpalWabbitBinaryClassifier, -) -from evalml.problem_types import ProblemTypes - - -def test_model_family(): - assert VowpalWabbitBinaryClassifier.model_family == ModelFamily.VOWPAL_WABBIT - - -def test_problem_types(): - assert set(VowpalWabbitBinaryClassifier.supported_problem_types) == { - ProblemTypes.BINARY, - ProblemTypes.TIME_SERIES_BINARY, - } - - -def test_vw_parameters(): - vw = VowpalWabbitBinaryClassifier() - expected_parameters = { - "loss_function": "logistic", - "learning_rate": 0.5, - "decay_learning_rate": 1.0, - "power_t": 0.5, - "passes": 1, - } - assert vw.parameters == expected_parameters - - vw = VowpalWabbitBinaryClassifier( - loss_function="classic", - learning_rate=0.1, - decay_learning_rate=1.0, - power_t=0.1, - passes=2, - ) - expected_parameters = { - "loss_function": "classic", - "learning_rate": 0.1, - "decay_learning_rate": 1.0, - "power_t": 0.1, - "passes": 2, - } - assert vw.parameters == expected_parameters - - -def test_fit_predict(X_y_binary, vw): - X, y = X_y_binary - vw_classifier = VowpalWabbitBinaryClassifier() - - vw_classifier.fit(X, y) - y_pred = vw_classifier.predict(X) - y_pred_proba = vw_classifier.predict_proba(X) - - clf = vw.VWClassifier( - loss_function="logistic", - learning_rate=0.5, - decay_learning_rate=1.0, - power_t=0.5, - passes=1, - ) - clf.fit(X, y) - y_pred_sk = clf.predict(X) - y_pred_proba_sk = clf.predict_proba(X) - - np.testing.assert_almost_equal(y_pred_sk, y_pred, decimal=5) - np.testing.assert_almost_equal(y_pred_proba_sk, y_pred_proba, decimal=5) - - -def test_feature_importance(X_y_binary): - X, y = X_y_binary - vw = VowpalWabbitBinaryClassifier() - vw.fit(X, y) - with pytest.raises( - NotImplementedError, - match="Feature importance is not implemented for the Vowpal Wabbit classifiers", - ): - vw.feature_importance diff --git a/evalml/tests/component_tests/test_vowpal_wabbit_multiclass_classifier.py b/evalml/tests/component_tests/test_vowpal_wabbit_multiclass_classifier.py deleted file mode 100644 index 3a9ae9b5e1..0000000000 --- a/evalml/tests/component_tests/test_vowpal_wabbit_multiclass_classifier.py +++ /dev/null @@ -1,80 +0,0 @@ -import numpy as np -import pytest - -from evalml.model_family import ModelFamily -from evalml.pipelines.components.estimators.classifiers import ( - VowpalWabbitMulticlassClassifier, -) -from evalml.problem_types import ProblemTypes - - -def test_vw_model_family(): - assert VowpalWabbitMulticlassClassifier.model_family == ModelFamily.VOWPAL_WABBIT - - -def test_vw_problem_types(): - assert set(VowpalWabbitMulticlassClassifier.supported_problem_types) == { - ProblemTypes.MULTICLASS, - ProblemTypes.TIME_SERIES_MULTICLASS, - } - - -def test_vw_parameters(): - vw = VowpalWabbitMulticlassClassifier() - expected_parameters = { - "loss_function": "logistic", - "learning_rate": 0.5, - "decay_learning_rate": 1.0, - "power_t": 0.5, - "passes": 1, - } - assert vw.parameters == expected_parameters - - vw = VowpalWabbitMulticlassClassifier( - loss_function="classic", - learning_rate=0.1, - decay_learning_rate=1.0, - power_t=0.1, - passes=2, - ) - expected_parameters = { - "loss_function": "classic", - "learning_rate": 0.1, - "decay_learning_rate": 1.0, - "power_t": 0.1, - "passes": 2, - } - assert vw.parameters == expected_parameters - - -def test_vw_fit_predict(X_y_multi, vw): - X, y = X_y_multi - vw_classifier = VowpalWabbitMulticlassClassifier() - - vw_classifier.fit(X, y) - y_pred = vw_classifier.predict(X) - y_pred_proba = vw_classifier.predict_proba(X) - - clf = vw.VWMultiClassifier( - loss_function="logistic", - learning_rate=0.5, - decay_learning_rate=1.0, - power_t=0.5, - ) - clf.fit(X, y) - y_pred_sk = clf.predict(X) - y_pred_proba_sk = clf.predict_proba(X) - - np.testing.assert_almost_equal(y_pred_sk, y_pred, decimal=5) - np.testing.assert_almost_equal(y_pred_proba_sk, y_pred_proba, decimal=5) - - -def test_vw_feature_importance(X_y_multi): - X, y = X_y_multi - vw = VowpalWabbitMulticlassClassifier() - vw.fit(X, y) - with pytest.raises( - NotImplementedError, - match="Feature importance is not implemented for the Vowpal Wabbit classifiers", - ): - vw.feature_importance diff --git a/evalml/tests/component_tests/test_vowpal_wabbit_regressor.py b/evalml/tests/component_tests/test_vowpal_wabbit_regressor.py deleted file mode 100644 index 705ee78a37..0000000000 --- a/evalml/tests/component_tests/test_vowpal_wabbit_regressor.py +++ /dev/null @@ -1,72 +0,0 @@ -import numpy as np -import pytest - -from evalml.model_family import ModelFamily -from evalml.pipelines.components.estimators.regressors import VowpalWabbitRegressor -from evalml.problem_types import ProblemTypes - - -def test_vw_model_family(): - assert VowpalWabbitRegressor.model_family == ModelFamily.VOWPAL_WABBIT - - -def test_vw_problem_types(): - assert set(VowpalWabbitRegressor.supported_problem_types) == { - ProblemTypes.REGRESSION, - ProblemTypes.TIME_SERIES_REGRESSION, - } - - -def test_vw_parameters(): - vw = VowpalWabbitRegressor() - expected_parameters = { - "learning_rate": 0.5, - "decay_learning_rate": 1.0, - "power_t": 0.5, - "passes": 1, - } - assert vw.parameters == expected_parameters - - vw = VowpalWabbitRegressor( - learning_rate=0.1, - decay_learning_rate=1.0, - power_t=0.1, - passes=2, - ) - expected_parameters = { - "learning_rate": 0.1, - "decay_learning_rate": 1.0, - "power_t": 0.1, - "passes": 2, - } - assert vw.parameters == expected_parameters - - -def test_vw_fit_predict(X_y_regression, vw): - X, y = X_y_regression - vw_regressor = VowpalWabbitRegressor() - - vw_regressor.fit(X, y) - y_pred = vw_regressor.predict(X) - - clf = vw.VWRegressor( - learning_rate=0.5, - decay_learning_rate=1.0, - power_t=0.5, - passes=1, - ) - clf.fit(X, y) - y_pred_sk = clf.predict(X) - - np.testing.assert_almost_equal(y_pred_sk, y_pred, decimal=5) - - -def test_vw_feature_importance(X_y_regression): - X, y = X_y_regression - vw = VowpalWabbitRegressor() - vw.fit(X, y) - with pytest.raises( - NotImplementedError, - match="Feature importance is not implemented for the Vowpal Wabbit regressor", - ): - vw.feature_importance diff --git a/evalml/tests/conftest.py b/evalml/tests/conftest.py index 553ee9fe8c..9b0efd125c 100644 --- a/evalml/tests/conftest.py +++ b/evalml/tests/conftest.py @@ -88,13 +88,6 @@ def lgbm(): return lgbm -@pytest.fixture(scope="session") -def vw(): - from vowpalwabbit import sklearn_vw as vw - - return vw - - @pytest.fixture(scope="session") def graphviz(): import graphviz diff --git a/evalml/tests/dependency_update_check/latest_dependency_versions.txt b/evalml/tests/dependency_update_check/latest_dependency_versions.txt index 9cd8226313..aa8c4cd970 100644 --- a/evalml/tests/dependency_update_check/latest_dependency_versions.txt +++ b/evalml/tests/dependency_update_check/latest_dependency_versions.txt @@ -34,6 +34,5 @@ sktime==0.28.1 statsmodels==0.14.2 texttable==1.7.0 tomli==2.0.1 -vowpalwabbit==9.9.0 woodwork==0.31.0 xgboost==2.0.3 diff --git a/evalml/tests/dependency_update_check/minimum_requirements.txt b/evalml/tests/dependency_update_check/minimum_requirements.txt index 1e9c2ae224..2459731330 100644 --- a/evalml/tests/dependency_update_check/minimum_requirements.txt +++ b/evalml/tests/dependency_update_check/minimum_requirements.txt @@ -32,6 +32,5 @@ sktime==0.21.0 statsmodels==0.12.2 texttable==1.6.2 tomli==2.0.1 -vowpalwabbit==8.11.0 woodwork[dask]==0.22.0 xgboost==1.7.0.post0 diff --git a/evalml/tests/dependency_update_check/minimum_test_requirements.txt b/evalml/tests/dependency_update_check/minimum_test_requirements.txt index 382fe8e637..1eac35a610 100644 --- a/evalml/tests/dependency_update_check/minimum_test_requirements.txt +++ b/evalml/tests/dependency_update_check/minimum_test_requirements.txt @@ -40,6 +40,5 @@ sktime==0.21.0 statsmodels==0.12.2 texttable==1.6.2 tomli==2.0.1 -vowpalwabbit==8.11.0 woodwork[dask]==0.22.0 xgboost==1.7.0.post0 diff --git a/evalml/utils/gen_utils.py b/evalml/utils/gen_utils.py index 285cf6a99c..999003fb80 100644 --- a/evalml/utils/gen_utils.py +++ b/evalml/utils/gen_utils.py @@ -217,9 +217,6 @@ def _get_subclasses(base_class): "SVMClassifier", "SVMRegressor", "LinearRegressor", - "VowpalWabbitBinaryClassifier", - "VowpalWabbitMulticlassClassifier", - "VowpalWabbitRegressor", "DecisionTreeClassifier", "DecisionTreeRegressor", "CatBoostRegressor", diff --git a/pyproject.toml b/pyproject.toml index 98d7e23c66..de9cc14e49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,6 @@ dependencies = [ "pmdarima >= 1.8.5", "sktime >= 0.21.0, < 0.29.0", "lime >= 0.2.0.1", - "vowpalwabbit >= 8.11.0", "tomli >= 2.0.1", "packaging >= 23.0", "black[jupyter] >= 22.3.0", From 867090cae9282bdce4beb9d98179e4ce273dc4d5 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Fri, 17 May 2024 15:38:23 -0700 Subject: [PATCH 08/26] release notes and __init__ --- docs/source/release_notes.rst | 1 + evalml/pipelines/__init__.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 69dcc41a21..a23df2330e 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -6,6 +6,7 @@ Release Notes * Fixes * Changes * Dropped support for Python 3.8 :pr:`4414` + * Removed vowpalwabbit :pr:`4427` * Documentation Changes * Testing Changes * Run airflow tests in Python 3.9 :pr:`4391` diff --git a/evalml/pipelines/__init__.py b/evalml/pipelines/__init__.py index 784e8046bd..60336b5b85 100644 --- a/evalml/pipelines/__init__.py +++ b/evalml/pipelines/__init__.py @@ -41,9 +41,6 @@ ARIMARegressor, VARMAXRegressor, ProphetRegressor, - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, - VowpalWabbitRegressor, DropNaNRowsTransformer, TimeSeriesRegularizer, OrdinalEncoder, From ac1385123bb480e0e871c5088f0dd579a883c568 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Fri, 17 May 2024 15:41:33 -0700 Subject: [PATCH 09/26] latest depdendency --- .../dependency_update_check/latest_dependency_versions.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evalml/tests/dependency_update_check/latest_dependency_versions.txt b/evalml/tests/dependency_update_check/latest_dependency_versions.txt index aa8c4cd970..6223150cd1 100644 --- a/evalml/tests/dependency_update_check/latest_dependency_versions.txt +++ b/evalml/tests/dependency_update_check/latest_dependency_versions.txt @@ -4,9 +4,9 @@ category-encoders==2.5.1.post0 click==8.1.7 cloudpickle==3.0.0 colorama==0.4.6 -dask==2024.5.0 -dask-expr==1.1.0 -distributed==2024.5.0 +dask==2024.5.1 +dask-expr==1.1.1 +distributed==2024.5.1 featuretools==1.31.0 graphviz==0.20.3 holidays==0.20 From cf097ee7c3e72243ea02af4c1516fc472da423d2 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Mon, 20 May 2024 09:51:59 -0700 Subject: [PATCH 10/26] fix test --- evalml/tests/component_tests/test_components.py | 4 ++-- evalml/tests/component_tests/test_utils.py | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/evalml/tests/component_tests/test_components.py b/evalml/tests/component_tests/test_components.py index 216a7e0f43..95ce700a7e 100644 --- a/evalml/tests/component_tests/test_components.py +++ b/evalml/tests/component_tests/test_components.py @@ -961,9 +961,9 @@ def test_components_can_be_used_for_partial_dependence_fast_mode(): # Expected number is hardcoded so that this test will fail when new components are added # It should be len(all_native_components) - num_invalid_for_pd_fast_mode if ProphetRegressor not in all_native_components: - expected_num_valid_for_pd_fast_mode = 65 + expected_num_valid_for_pd_fast_mode = 62 else: - expected_num_valid_for_pd_fast_mode = 66 + expected_num_valid_for_pd_fast_mode = 63 assert num_valid_for_pd_fast_mode == expected_num_valid_for_pd_fast_mode diff --git a/evalml/tests/component_tests/test_utils.py b/evalml/tests/component_tests/test_utils.py index 552ba00d26..caca339674 100644 --- a/evalml/tests/component_tests/test_utils.py +++ b/evalml/tests/component_tests/test_utils.py @@ -94,9 +94,6 @@ "STL Decomposer", "Prophet Regressor", "Target Encoder", - "Vowpal Wabbit Binary Classifier", - "Vowpal Wabbit Multiclass Classifier", - "Vowpal Wabbit Regressor", "XGBoost Classifier", "XGBoost Regressor", "VARMAX Regressor", From 8f3af8c9bc3ff8f3e69373c253ac5da5284d151e Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Mon, 20 May 2024 10:44:04 -0700 Subject: [PATCH 11/26] idk codecov --- evalml/tests/component_tests/test_components.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/evalml/tests/component_tests/test_components.py b/evalml/tests/component_tests/test_components.py index 95ce700a7e..e1140bde47 100644 --- a/evalml/tests/component_tests/test_components.py +++ b/evalml/tests/component_tests/test_components.py @@ -933,17 +933,20 @@ def test_default_parameters_raise_no_warnings(cls): assert len(w) == 0 -def test_components_can_be_used_for_partial_dependence_fast_mode(): +@pytest.mark.parametrize("prophet", [True, False]) +def test_components_can_be_used_for_partial_dependence_fast_mode(prophet): """This test is intended to fail when new components are added to remind developers to decide whether or not partial dependence fast mode should be allowed for the new component. """ all_native_components = all_components() - invalid_for_pd_fast_mode = [ cls.name for cls in all_native_components if not cls._can_be_used_for_fast_partial_dependence ] + if not prophet: + all_native_components.remove(ProphetRegressor) + num_valid_for_pd_fast_mode = len( [ cls.name @@ -951,7 +954,6 @@ def test_components_can_be_used_for_partial_dependence_fast_mode(): if cls._can_be_used_for_fast_partial_dependence ], ) - assert invalid_for_pd_fast_mode == [ "Stacked Ensemble Regressor", "Stacked Ensemble Classifier", From 8b6288f119c7d6bd6722d4c711f3884a14198df7 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Mon, 20 May 2024 11:26:00 -0700 Subject: [PATCH 12/26] codecov 2 --- evalml/tests/component_tests/test_components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evalml/tests/component_tests/test_components.py b/evalml/tests/component_tests/test_components.py index e1140bde47..53fb9f948f 100644 --- a/evalml/tests/component_tests/test_components.py +++ b/evalml/tests/component_tests/test_components.py @@ -944,7 +944,7 @@ def test_components_can_be_used_for_partial_dependence_fast_mode(prophet): for cls in all_native_components if not cls._can_be_used_for_fast_partial_dependence ] - if not prophet: + if not prophet and ProphetRegressor in all_native_components: all_native_components.remove(ProphetRegressor) num_valid_for_pd_fast_mode = len( From 54d37532ebd26f5f67d64cb7229a3f57dbea36e3 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 09:58:04 -0700 Subject: [PATCH 13/26] release notes --- docs/source/release_notes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 4781d0252b..1ae615d9f1 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -18,6 +18,7 @@ Release Notes **Breaking Changes** * Dropped support for Python 3.7 :pr:`3291` + * Removed vowpalwabbit :pr:`4427` **v0.83.0 Feb 2, 2024** From 787a2a582762c403ea9c837b6779824f7bac0050 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 11:40:02 -0700 Subject: [PATCH 14/26] uncapp pytest-related things --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 69420a1971..da6dcfe4ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,9 +78,9 @@ dependencies = [ [project.optional-dependencies] test = [ "pytest == 7.1.2", - "pytest-xdist == 2.1.0", - "pytest-timeout == 1.4.2", - "pytest-cov == 2.10.1", + "pytest-xdist >= 2.1.0", + "pytest-timeout >= 1.4.2", + "pytest-cov >= 2.10.1", "nbval == 0.9.3", "IPython >= 8.10.0, <8.12.1", "PyYAML == 6.0.1", From 4213a84091847bdacde3af5430ab99970e502c21 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 12:18:03 -0700 Subject: [PATCH 15/26] attempting kaleido fix --- evalml/tests/utils_tests/test_gen_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evalml/tests/utils_tests/test_gen_utils.py b/evalml/tests/utils_tests/test_gen_utils.py index 36688e1698..922b413c7b 100644 --- a/evalml/tests/utils_tests/test_gen_utils.py +++ b/evalml/tests/utils_tests/test_gen_utils.py @@ -40,7 +40,11 @@ def in_container_arm64(): if os.getenv("DOCKER_ARM", None): import plotly.io as pio - pio.kaleido.scope.chromium_args += ("--single-process",) + pio.kaleido.scope.chromium_args += ( + "--single-process", + "--headless", + "--disable-gpu", + ) @patch("importlib.import_module") From 1c7276d8296ceb9d83cbc4d61da93a926837546b Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 12:24:22 -0700 Subject: [PATCH 16/26] don't use cache --- .github/workflows/install_test.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/install_test.yaml b/.github/workflows/install_test.yaml index 8ad83e1973..14b460a23a 100644 --- a/.github/workflows/install_test.yaml +++ b/.github/workflows/install_test.yaml @@ -45,10 +45,6 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: | python -m pip install "unpacked_sdist/." - - name: Install evalml from sdist (using cache) - if: steps.cache.outputs.cache-hit == 'true' - run: | - python -m pip install "unpacked_sdist/." --no-deps - name: Test by importing packages run: | python -c "import evalml" From 5f8a18aa53fb59b61653222ca5eda7151b84d5d7 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 12:27:12 -0700 Subject: [PATCH 17/26] remove if statement --- .github/workflows/install_test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/install_test.yaml b/.github/workflows/install_test.yaml index 14b460a23a..e2b0984d7a 100644 --- a/.github/workflows/install_test.yaml +++ b/.github/workflows/install_test.yaml @@ -42,7 +42,6 @@ jobs: - name: Build evalml package run: make package - name: Install evalml from sdist (not using cache) - if: steps.cache.outputs.cache-hit != 'true' run: | python -m pip install "unpacked_sdist/." - name: Test by importing packages From f5b99caeea3bc89061b4ff7d382e729d3ec61deb Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 13:24:12 -0700 Subject: [PATCH 18/26] test 3 --- evalml/tests/utils_tests/test_gen_utils.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/evalml/tests/utils_tests/test_gen_utils.py b/evalml/tests/utils_tests/test_gen_utils.py index 922b413c7b..51184e729d 100644 --- a/evalml/tests/utils_tests/test_gen_utils.py +++ b/evalml/tests/utils_tests/test_gen_utils.py @@ -37,14 +37,14 @@ def in_container_arm64(): The env var is set in the Dockerfile.arm for the purposes of local testing in a container on a mac M1, otherwise it's a noop. """ - if os.getenv("DOCKER_ARM", None): - import plotly.io as pio + # if os.getenv("DOCKER_ARM", None): + import plotly.io as pio - pio.kaleido.scope.chromium_args += ( - "--single-process", - "--headless", - "--disable-gpu", - ) + pio.kaleido.scope.chromium_args += ( + "--single-process", + "--headless", + "--disable-gpu", + ) @patch("importlib.import_module") From 34996d54e88beab34014f7cb623f52a091022c06 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 13:32:29 -0700 Subject: [PATCH 19/26] Revert "test 3" This reverts commit de352579ed4e4a41eea5466f20a9b60fdb1cf121. --- evalml/tests/utils_tests/test_gen_utils.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/evalml/tests/utils_tests/test_gen_utils.py b/evalml/tests/utils_tests/test_gen_utils.py index 51184e729d..922b413c7b 100644 --- a/evalml/tests/utils_tests/test_gen_utils.py +++ b/evalml/tests/utils_tests/test_gen_utils.py @@ -37,14 +37,14 @@ def in_container_arm64(): The env var is set in the Dockerfile.arm for the purposes of local testing in a container on a mac M1, otherwise it's a noop. """ - # if os.getenv("DOCKER_ARM", None): - import plotly.io as pio + if os.getenv("DOCKER_ARM", None): + import plotly.io as pio - pio.kaleido.scope.chromium_args += ( - "--single-process", - "--headless", - "--disable-gpu", - ) + pio.kaleido.scope.chromium_args += ( + "--single-process", + "--headless", + "--disable-gpu", + ) @patch("importlib.import_module") From a0023012b2a22e765bae565ef3af30db42ede5dc Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 13:38:26 -0700 Subject: [PATCH 20/26] force kaleido to be headless --- evalml/tests/utils_tests/test_gen_utils.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/evalml/tests/utils_tests/test_gen_utils.py b/evalml/tests/utils_tests/test_gen_utils.py index 922b413c7b..51184e729d 100644 --- a/evalml/tests/utils_tests/test_gen_utils.py +++ b/evalml/tests/utils_tests/test_gen_utils.py @@ -37,14 +37,14 @@ def in_container_arm64(): The env var is set in the Dockerfile.arm for the purposes of local testing in a container on a mac M1, otherwise it's a noop. """ - if os.getenv("DOCKER_ARM", None): - import plotly.io as pio + # if os.getenv("DOCKER_ARM", None): + import plotly.io as pio - pio.kaleido.scope.chromium_args += ( - "--single-process", - "--headless", - "--disable-gpu", - ) + pio.kaleido.scope.chromium_args += ( + "--single-process", + "--headless", + "--disable-gpu", + ) @patch("importlib.import_module") From ebb35cd9eefb1e9e9cbb1c7774ab9857b61b9a14 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 14:19:01 -0700 Subject: [PATCH 21/26] unpinned and bumped kaleido --- .github/meta.yaml | 2 +- .../dependency_update_check/latest_dependency_versions.txt | 2 +- evalml/tests/utils_tests/test_gen_utils.py | 1 - pyproject.toml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/meta.yaml b/.github/meta.yaml index 764d4d59da..18e8db60e0 100644 --- a/.github/meta.yaml +++ b/.github/meta.yaml @@ -69,7 +69,7 @@ outputs: run: - '{{ pin_subpackage("evalml-core", max_pin="x.x.x.x") }}' - plotly >=5.0.0 - - python-kaleido ==0.2.0 + - python-kaleido >=0.2.0 - matplotlib-base >=3.3.3 - seaborn >=0.11.1 - ipywidgets >=7.5 diff --git a/evalml/tests/dependency_update_check/latest_dependency_versions.txt b/evalml/tests/dependency_update_check/latest_dependency_versions.txt index f882e2a300..d0ae339102 100644 --- a/evalml/tests/dependency_update_check/latest_dependency_versions.txt +++ b/evalml/tests/dependency_update_check/latest_dependency_versions.txt @@ -12,7 +12,7 @@ graphviz==0.20.3 holidays==0.49 imbalanced-learn==0.12.2 ipywidgets==8.1.2 -kaleido==0.2.0 +kaleido==0.2.1 lightgbm==4.3.0 lime==0.2.0.1 matplotlib==3.9.0 diff --git a/evalml/tests/utils_tests/test_gen_utils.py b/evalml/tests/utils_tests/test_gen_utils.py index 51184e729d..898616cf58 100644 --- a/evalml/tests/utils_tests/test_gen_utils.py +++ b/evalml/tests/utils_tests/test_gen_utils.py @@ -37,7 +37,6 @@ def in_container_arm64(): The env var is set in the Dockerfile.arm for the purposes of local testing in a container on a mac M1, otherwise it's a noop. """ - # if os.getenv("DOCKER_ARM", None): import plotly.io as pio pio.kaleido.scope.chromium_args += ( diff --git a/pyproject.toml b/pyproject.toml index da6dcfe4ff..9f55a9c792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ dependencies = [ "nlp-primitives >= 2.9.0", "networkx >= 2.7", "plotly >= 5.0.0", - "kaleido == 0.2.0", + "kaleido >= 0.2.0", "ipywidgets >= 7.5", "xgboost >= 1.7.0.post0", "catboost >= 1.1.1", From dd39558eb51f2ba69c429a7f9ff987ad3c23470a Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 14:21:45 -0700 Subject: [PATCH 22/26] release note update --- docs/source/release_notes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 955de4e44d..b166181190 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -8,6 +8,7 @@ Release Notes * Dropped support for Python 3.8 :pr:`4414` * Removed vowpalwabbit :pr:`4427` * Uncapped holidays :pr:`4428` + * Uncapped kaleido :pr:`4423` * Documentation Changes * Testing Changes * Run airflow tests in Python 3.9 :pr:`4391` From 1d9201be5b2e81916b894de33a8ec8525d1b2b90 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 14:25:22 -0700 Subject: [PATCH 23/26] release note but actually --- docs/source/release_notes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index b166181190..3f6c93666f 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -8,7 +8,7 @@ Release Notes * Dropped support for Python 3.8 :pr:`4414` * Removed vowpalwabbit :pr:`4427` * Uncapped holidays :pr:`4428` - * Uncapped kaleido :pr:`4423` + * Unpinned kaleido, pytest-xdist, pytest-timeout, and pytest-cov :pr:`4423` * Documentation Changes * Testing Changes * Run airflow tests in Python 3.9 :pr:`4391` From c65fa71b46a94698ba378385b3dcd8a341b9ee1d Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 14:30:03 -0700 Subject: [PATCH 24/26] docstring update --- evalml/tests/utils_tests/test_gen_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evalml/tests/utils_tests/test_gen_utils.py b/evalml/tests/utils_tests/test_gen_utils.py index 898616cf58..abbd07014b 100644 --- a/evalml/tests/utils_tests/test_gen_utils.py +++ b/evalml/tests/utils_tests/test_gen_utils.py @@ -34,8 +34,8 @@ def in_container_arm64(): """Helper fixture to run chromium as a single process for kaleido. - The env var is set in the Dockerfile.arm for the purposes of local - testing in a container on a mac M1, otherwise it's a noop. + Useful as kaleido > 0.1.0 on windows seems to plotly.write_image to hang indefinitely. + Makes tests that use plotly not hang and thus pass. """ import plotly.io as pio From cd3f4f8110eb2d1053ab4443f993a947c344e9a3 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Tue, 21 May 2024 14:43:50 -0700 Subject: [PATCH 25/26] removed pytest changes (do it in another mr) --- docs/source/release_notes.rst | 2 +- pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 3f6c93666f..6934ef6327 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -8,7 +8,7 @@ Release Notes * Dropped support for Python 3.8 :pr:`4414` * Removed vowpalwabbit :pr:`4427` * Uncapped holidays :pr:`4428` - * Unpinned kaleido, pytest-xdist, pytest-timeout, and pytest-cov :pr:`4423` + * Unpinned kaleido :pr:`4423` * Documentation Changes * Testing Changes * Run airflow tests in Python 3.9 :pr:`4391` diff --git a/pyproject.toml b/pyproject.toml index 9f55a9c792..2da1e0473a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,9 +78,9 @@ dependencies = [ [project.optional-dependencies] test = [ "pytest == 7.1.2", - "pytest-xdist >= 2.1.0", - "pytest-timeout >= 1.4.2", - "pytest-cov >= 2.10.1", + "pytest-xdist == 2.1.0", + "pytest-timeout == 1.4.2", + "pytest-cov == 2.10.1", "nbval == 0.9.3", "IPython >= 8.10.0, <8.12.1", "PyYAML == 6.0.1", From 2b11a6918d3620df5eee8426390626714cb3bd47 Mon Sep 17 00:00:00 2001 From: MichaelFu512 Date: Wed, 22 May 2024 10:31:07 -0700 Subject: [PATCH 26/26] becca's comments --- .github/workflows/install_test.yaml | 2 +- evalml/tests/utils_tests/test_gen_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_test.yaml b/.github/workflows/install_test.yaml index e2b0984d7a..f966a3e0fd 100644 --- a/.github/workflows/install_test.yaml +++ b/.github/workflows/install_test.yaml @@ -41,7 +41,7 @@ jobs: run: brew install cmake libomp - name: Build evalml package run: make package - - name: Install evalml from sdist (not using cache) + - name: Install evalml from sdist run: | python -m pip install "unpacked_sdist/." - name: Test by importing packages diff --git a/evalml/tests/utils_tests/test_gen_utils.py b/evalml/tests/utils_tests/test_gen_utils.py index abbd07014b..c10843ef5c 100644 --- a/evalml/tests/utils_tests/test_gen_utils.py +++ b/evalml/tests/utils_tests/test_gen_utils.py @@ -34,7 +34,7 @@ def in_container_arm64(): """Helper fixture to run chromium as a single process for kaleido. - Useful as kaleido > 0.1.0 on windows seems to plotly.write_image to hang indefinitely. + Useful as kaleido > 0.1.0 can cause plotly.write_image to hang indefinitely. Makes tests that use plotly not hang and thus pass. """ import plotly.io as pio