Skip to content

Commit

Permalink
Merge pull request #3504 from goodwanghan/fixfuguetest1
Browse files Browse the repository at this point in the history
  • Loading branch information
Yard1 committed May 1, 2023
2 parents e5d6dfd + e7366dd commit 8608d5e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 24 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Install dependencies
run: |
pip install -U pytest pytest-xdist nbmake
pip install -e ".[full]"
pip install ".[full]"
python -m ipykernel install --user --name cikernel
- name: Python version and dependency list
run: |
Expand All @@ -69,7 +69,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -80,7 +80,7 @@ jobs:
python -m pip install -U pip
python -m pip install -U pytest numpy
pip install -e ".[full, test]"
pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
python -m pip install -U pip
python -m pip install -U pytest numpy
pip install -e ".[full, test]"
pip install ".[full, test]"
pip install -r requirements-prophet.txt
- name: Python version and dependency list
run: |
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
python -m pip install --upgrade pip
python -m pip install -U pytest numpy
pip install -e ".[full, test]"
pip install ".[full, test]"
- name: Python version and dependency list
run: |
echo "Python version expected: ${{ matrix.python-version }}"
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
python -m pip install -U pip
python -m pip install -U pytest numpy
pip install -e ".[full, test]"
pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
python -m pip install -U pip
python -m pip install -U pytest numpy
pip install -e ".[full, test]"
pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
python -m pip install -U pip
python -m pip install -U pytest numpy
pip install -e ".[full, test]"
pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
Expand All @@ -283,7 +283,7 @@ jobs:
# python -m pip install --upgrade pip
# python -m pip install -U pytest
# python -m pip install codecov
# pip install -e ".[full]"
# pip install ".[full]"
# python -m pip install hpbandster ConfigSpace
# - name: Remove tests
# run: |
Expand All @@ -306,7 +306,7 @@ jobs:
# python -m pip install --upgrade pip
# python -m pip install -U pytest
# python -m pip install codecov
# pip install -e ".[full]"
# pip install ".[full]"
# - name: Remove tests
# run: |
# remove-item tests/* -Exclude @('__init__.py','test_classification_tuning.py')
Expand All @@ -328,7 +328,7 @@ jobs:
# python -m pip install --upgrade pip
# python -m pip install -U pytest
# python -m pip install codecov
# pip install -e ".[full]"
# pip install ".[full]"
# - name: Remove tests
# run: |
# remove-item tests/* -Exclude @('__init__.py','test_regression_tuning.py')
Expand Down
3 changes: 2 additions & 1 deletion pycaret/loggers/mlflow_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from contextlib import contextmanager
from copy import deepcopy

from pycaret import __version__
from pycaret.loggers.base_logger import BaseLogger
from pycaret.utils.generic import mlflow_remove_bad_chars

Expand Down Expand Up @@ -130,6 +129,8 @@ def log_sklearn_pipeline(self, experiment, prep_pipe, model, path=None):
# get default conda env
from mlflow.sklearn import get_default_conda_env

from pycaret import __version__

default_conda_env = get_default_conda_env()
default_conda_env["name"] = f"{experiment.exp_name_log}-env"
default_conda_env.get("dependencies").pop(-3)
Expand Down
3 changes: 2 additions & 1 deletion pycaret/parallel/fugue_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def __init__(

def __getstate__(self) -> Dict[str, Any]:
res = dict(self.__dict__)
del res["_engine"]
if "_engine" in res:
del res["_engine"]
return res

def compare_models(
Expand Down
3 changes: 0 additions & 3 deletions tests/test_classification_parallel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import pycaret.classification as pc
from pycaret.datasets import get_data

Expand All @@ -8,7 +6,6 @@ def _score_dummy(y_true, y_prob, axis=0):
return 0.0


@pytest.mark.skip(reason="failing on github - dont know why. TODO: reenable after fix")
def test_classification_parallel():
from pycaret.parallel import FugueBackend

Expand Down
1 change: 0 additions & 1 deletion tests/test_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ def predict(self, X):
return np.array(X.shape[0] * [self.mean_])


@pytest.mark.skip(reason="failing on github - dont know why. TODO: reenable after fix")
def test_using_custom_model():
insurance = get_data("insurance")

Expand Down
3 changes: 0 additions & 3 deletions tests/test_regression_parallel.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import pytest

import pycaret.regression as pr
from pycaret.datasets import get_data


@pytest.mark.skip(reason="failing on github - dont know why. TODO: reenable after fix")
def test_regression_parallel():
from pycaret.parallel import FugueBackend

Expand Down
4 changes: 0 additions & 4 deletions tests/test_time_series_parallel.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import pytest

import pycaret.time_series as pt
from pycaret.datasets import get_data
from pycaret.parallel import FugueBackend


@pytest.mark.skip(reason="failing on github - dont know why. TODO: reenable after fix")
def test_ts_parallel():
exp = pt.TSForecastingExperiment()

Expand Down Expand Up @@ -35,7 +32,6 @@ def test_ts_parallel():
exp.pull()


@pytest.mark.skip(reason="failing on github - dont know why. TODO: reenable after fix")
def test_ts_parallel_singleton():
pt.setup(
data_func=lambda: get_data("airline", verbose=False),
Expand Down

0 comments on commit 8608d5e

Please sign in to comment.