diff --git a/.github/meta.yaml b/.github/meta.yaml index 6ded864291..c69dc32e64 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/docs/source/release_notes.rst b/docs/source/release_notes.rst index 4970bf204b..337b808a63 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` * Uncapped holidays :pr:`4428` * Documentation Changes * Testing Changes @@ -16,7 +17,8 @@ Release Notes .. warning:: **Breaking Changes** - * Dropped support for Python 3.7 :pr:`3291` + * Dropped support for Python 3.8 :pr:`4414` + * Removed vowpalwabbit :pr:`4427` **v0.83.0 Feb 2, 2024** 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, 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..53fb9f948f 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): @@ -990,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 and ProphetRegressor in all_native_components: + all_native_components.remove(ProphetRegressor) + num_valid_for_pd_fast_mode = len( [ cls.name @@ -1008,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", @@ -1018,9 +963,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 @@ -1215,9 +1160,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 +1341,6 @@ def test_serialization( ( StackedEnsembleClassifier, StackedEnsembleRegressor, - VowpalWabbitBinaryClassifier, - VowpalWabbitMulticlassClassifier, - VowpalWabbitRegressor, TimeSeriesBaselineEstimator, ), ) 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", 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 752b513e90..0a176ca75d 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 2633a5507f..ba30dea8d0 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",