Skip to content

Commit 1ce658d

Browse files
eccabaychukarsten
andauthored
Switch from using prophet-prebuilt to prophet (#4045)
* Switch prophet-prebuilt to prophet in pyproject.toml * (Test) add git-test-prophet to windows tests * Actually install prophet for the windows prophet tests * Fix typo * Remove now unnecessary install comments * Test updates to get windows prophet tests passing * Hopefully final fix for windows prophet tests * First attempt at adding prophet to conda build * Add prophet to regular pyproject dependencies (prophet extra exists, redundant) * GH workflows should no longer need to manuall install prophet * Dependency checks need to track prophet now too * Dont pin prophet in pyproject.toml * Release notes * Theres a newer version of prophet * Back out conda changes * Add back prophet as a rtd extra * Remove prophet from windows automl GH workflows to decrease runtime * Temporarily pin woodwork for testing purposes * Move non-prophet-dependent tests from git-test-prophet to git-test-other * Add a few files back for consistency * Unpin woodwork * Update release_notes.rst --------- Co-authored-by: chukarsten <64713315+chukarsten@users.noreply.github.com>
1 parent a40c7f1 commit 1ce658d

File tree

12 files changed

+41
-40
lines changed

12 files changed

+41
-40
lines changed

.github/workflows/windows_nightlies.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
python_version: ['3.8', '3.9']
16-
command: ['git-test-automl', 'git-test-modelunderstanding', 'git-test-other', 'git-test-parallel']
16+
command: ['git-test-automl', 'git-test-modelunderstanding', 'git-test-other', 'git-test-parallel', 'git-test-prophet']
1717
steps:
1818
- name: Download Miniconda
1919
shell: pwsh
@@ -57,7 +57,18 @@ jobs:
5757
conda config --add channels conda-forge
5858
conda activate curr_py
5959
conda install numba -q -y
60-
- name: Install EvalML with test requirements
60+
- if: ${{ matrix.command == 'git-test-prophet' }}
61+
name: Install EvalML with test requirements and prophet
62+
shell: pwsh
63+
run: |
64+
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
65+
conda activate curr_py
66+
python -m pip install --upgrade pip
67+
python -m pip install .[test]
68+
python -m pip install .[prophet]
69+
pip freeze
70+
- if: ${{ matrix.command != 'git-test-prophet' }}
71+
name: Install EvalML with test requirements
6172
shell: pwsh
6273
run: |
6374
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1

.github/workflows/windows_unit_tests.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
python_version: ['3.8']
18-
command: ['git-test-automl', 'git-test-modelunderstanding', 'git-test-other', 'git-test-parallel']
18+
command: ['git-test-automl', 'git-test-modelunderstanding', 'git-test-other', 'git-test-parallel', 'git-test-prophet']
1919
steps:
2020
- name: Download Miniconda
2121
shell: pwsh
@@ -59,7 +59,18 @@ jobs:
5959
conda config --add channels conda-forge
6060
conda activate curr_py
6161
conda install numba -q -y
62-
- name: Install EvalML with test requirements
62+
- if: ${{ matrix.command == 'git-test-prophet' }}
63+
name: Install EvalML with test requirements and prophet
64+
shell: pwsh
65+
run: |
66+
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
67+
conda activate curr_py
68+
python -m pip install --upgrade pip
69+
python -m pip install .[test]
70+
python -m pip install .[prophet]
71+
pip freeze
72+
- if: ${{ matrix.command != 'git-test-prophet' }}
73+
name: Install EvalML with test requirements
6374
shell: pwsh
6475
run: |
6576
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ git-test-modelunderstanding:
5252

5353
.PHONY: git-test-other
5454
git-test-other:
55-
pytest evalml/tests --ignore evalml/tests/automl_tests/ --ignore evalml/tests/tuner_tests/ --ignore evalml/tests/model_understanding_tests/ --ignore evalml/tests/pipeline_tests/ --ignore evalml/tests/utils_tests/ --ignore evalml/tests/component_tests/test_prophet_regressor.py --ignore evalml/tests/component_tests/test_components.py --ignore evalml/tests/component_tests/test_utils.py --ignore evalml/tests/integration_tests/ -n 2 --durations 0 --timeout $(TIMEOUT) --cov=evalml --cov-config=./pyproject.toml --junitxml=test-reports/git-test-other-junit.xml
55+
pytest evalml/tests --ignore evalml/tests/automl_tests/ --ignore evalml/tests/tuner_tests/ --ignore evalml/tests/model_understanding_tests/ --ignore evalml/tests/pipeline_tests/test_pipelines.py --ignore evalml/tests/component_tests/test_prophet_regressor.py --ignore evalml/tests/component_tests/test_components.py --ignore evalml/tests/component_tests/test_utils.py --ignore evalml/tests/integration_tests/ -n 2 --durations 0 --timeout $(TIMEOUT) --cov=evalml --cov-config=./pyproject.toml --junitxml=test-reports/git-test-other-junit.xml
5656
make doctests
5757

5858
.PHONY: git-test-prophet
5959
git-test-prophet:
60-
pytest evalml/tests/component_tests/test_prophet_regressor.py evalml/tests/component_tests/test_components.py evalml/tests/component_tests/test_utils.py evalml/tests/pipeline_tests/ evalml/tests/utils_tests/ -n 2 --durations 0 --timeout $(TIMEOUT) --cov=evalml --cov-config=./pyproject.toml --junitxml=test-reports/git-test-prophet-junit.xml
60+
pytest evalml/tests/component_tests/test_prophet_regressor.py evalml/tests/component_tests/test_components.py evalml/tests/component_tests/test_utils.py evalml/tests/pipeline_tests/test_pipelines.py -n 2 --durations 0 --timeout $(TIMEOUT) --cov=evalml --cov-config=./pyproject.toml --junitxml=test-reports/git-test-prophet-junit.xml
6161

6262
.PHONY: git-test-integration
6363
git-test-integration:

docs/source/install.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,35 +96,11 @@ $ conda install -c conda-forge alteryx-open-src-update-checker
9696
## Time Series support with Facebook's Prophet
9797

9898
To support the `Prophet` time series estimator, be sure to install it as an extra requirement. Please note that this may take a few minutes.
99-
Prophet is currently only supported via pip installation in EvalML for Mac with CmdStan as a backend.
10099
```shell
101100
pip install evalml[prophet]
102101
```
103102
Another option for installing Prophet with CmdStan as a backend is to use `make installdeps-prophet`.
104103

105-
Note: In order to do this, you must have the EvalML repo cloned and you must be in the top level folder `<your_directory>/evalml/` to execute this command.
106-
This command will do the following:
107-
- Pip install `cmdstanpy==0.9.68`
108-
- Execute the `install_cmdstan.py` script found within your `site-packages/cmdstanpy` which builds `cmdstan` in your `site-packages`.
109-
- Install `Prophet==1.0.1` with the `CMDSTAN` and `STAN_BACKEND` environment variables set.
110-
111-
If the `site-packages` path is incorrect or you'd like to specify a different one, just run `make installdeps-prophet SITE_PACKAGES_DIR="<path_to_your_site_packages>"`.
112-
113-
If you'd like to have more fine-tuned control over the installation steps for Prophet, such as specifying the backend, follow these steps:
114-
115-
````{tab} PyStan (default)
116-
```console
117-
$ pip install prophet==1.0.1
118-
```
119-
````
120-
````{tab} CmdStanPy backend
121-
```console
122-
$ pip install cmdstanpy==0.9.68
123-
$ python <path_to_installed_cmdstanpy>/install_cmdstan.py --dir <path_to_build_cmdstan> -v <version_to_use>
124-
$ CMDSTAN=<path_to_build_cmdstan>/cmdstan-<version_to_use> STAN_BACKEND=CMDSTANPY pip install prophet==1.0.1
125-
126-
```
127-
````
128104

129105
## Windows Additional Requirements & Troubleshooting
130106

docs/source/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release Notes
66
* Changes
77
* Added Oversampler nullable type incompatibility in X :pr:`4068`
88
* Removed nullable handling from objective functions, ``roc_curve``, and ``correlation_matrix`` :pr:`4072`
9+
* Transitioned from ``prophet-prebuilt`` to ``prophet`` directly :pr:`4045`
910
* Documentation Changes
1011
* Testing Changes
1112

evalml/pipelines/components/estimators/regressors/xgboost_regressor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def get_prediction_intervals(
117117
coverage: List[float] = None,
118118
predictions: pd.Series = None,
119119
) -> Dict[str, pd.Series]:
120-
"""Find the prediction intervals using the fitted ProphetRegressor.
120+
"""Find the prediction intervals using the fitted XGBoostRegressor.
121121
122122
Args:
123123
X (pd.DataFrame): Data of shape [n_samples, n_features].

evalml/tests/automl_tests/test_automl.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4935,7 +4935,6 @@ def test_automl_restricts_use_covariates_for_arima(
49354935
hyperparams,
49364936
automl_algo,
49374937
AutoMLTestEnv,
4938-
is_using_windows,
49394938
):
49404939
X, y = datasets.make_classification(
49414940
n_samples=n_rows,
@@ -4993,7 +4992,6 @@ def test_automl_does_not_restrict_use_covariates_if_user_specified(
49934992
hyperparams,
49944993
automl_algo,
49954994
AutoMLTestEnv,
4996-
is_using_windows,
49974995
X_y_binary,
49984996
):
49994997
X, y = X_y_binary

evalml/tests/component_tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def test_all_components(
118118
is_using_conda,
119119
):
120120
if is_using_conda:
121-
# No prophet, ARIMA, and vowpalwabbit
121+
# No prophet
122122
expected_components = all_requirements_set.difference(
123123
not_supported_in_conda,
124124
)

evalml/tests/pipeline_tests/test_pipeline_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,12 @@ def test_generate_pipeline_example(
856856
X_y_multi,
857857
X_y_regression,
858858
ts_data,
859+
is_using_windows,
859860
):
861+
if is_using_windows:
862+
pytest.xfail(
863+
"Pipeline code generation is not expected to work on Windows machines",
864+
)
860865
if automl_type == ProblemTypes.BINARY:
861866
X, y = X_y_binary
862867
elif automl_type == ProblemTypes.MULTICLASS:

evalml/tests/pipeline_tests/test_pipelines.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,11 @@ def test_allowed_model_families():
111111

112112
def test_all_estimators(
113113
is_using_conda,
114-
is_using_windows,
115114
):
116115
if is_using_conda:
117116
n_estimators = 17
118117
else:
119-
# This is wrong because only prophet is missing in windows
120-
# but we don't run this test in windows.
121-
# TODO: Change when https://github.com/alteryx/evalml/issues/3190 is addressed
122-
n_estimators = 16 if is_using_windows else 18
118+
n_estimators = 18
123119
assert len(_all_estimators_used_in_search()) == n_estimators
124120

125121

0 commit comments

Comments
 (0)