From d21aaf4bf0f85225eb02d8e00ab4f5d83fdfd05a Mon Sep 17 00:00:00 2001 From: Hubert Baniecki Date: Wed, 28 Feb 2024 17:51:31 +0100 Subject: [PATCH] [python] dalex v1.7.0; remove python 3.7 to fix pandas closes #558 --- python/dalex/NEWS.md | 26 ++++++++++--------- .../_ceteris_paribus/checks.py | 2 +- python/dalex/setup.py | 8 +++--- tox.ini | 4 +-- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/python/dalex/NEWS.md b/python/dalex/NEWS.md index d8e365ee2..493876587 100644 --- a/python/dalex/NEWS.md +++ b/python/dalex/NEWS.md @@ -1,29 +1,31 @@ ## Changelog -### v1.6.1 (2024-02-28) +### v1.7.0 (2024-02-28) -* Added `keras.src.models.sequential.Sequential` to classes with a known `predict_function`; it should fix changes in `keras==3.0.0` and `tensorflow==2.16.0` -* Turn off `verbose` in the predict method of tensorflow/keras models that [changed](https://stackoverflow.com/a/73244830) in `tensorflow>=2.9.0` -* Fix an error occuring in `predict_profile()` when a DataFrame has MultiIndex in `pandas>=1.3.0` ([#550](https://github.com/ModelOriented/DALEX/pull/550)) -* Fix gaussian `norm()` calculation in `model_profile()` from `pi*sqrt(2)` to `sqrt(2*pi)` -* Fix a warning (future error) between `prepare_numerical_categorical()` and `prepare_x()` with `pandas==2.1.0` -* Fix a warning (future error) concerning the default value of `numeric_only` in `pandas.DataFrame.corr()` in `dalex.aspect.calculate_assoc_matrix()` +* increase the dependencies to `python>=3.8`, `pandas>=1.5.0`, `numpy>=1.23.3` and add `python==3.11` to CI +* added `keras.src.models.sequential.Sequential` to classes with a known `predict_function`; it should fix changes in `keras==3.0.0` and `tensorflow==2.16.0` +* turn off `verbose` in the predict method of tensorflow/keras models that [changed](https://stackoverflow.com/a/73244830) in `tensorflow>=2.9.0` +* update the warning occurring when specifying `variable_splits` ([#558](https://github.com/ModelOriented/DALEX/pull/558)) +* fix an error occuring in `predict_profile()` when a DataFrame has MultiIndex in `pandas>=1.3.0` ([#550](https://github.com/ModelOriented/DALEX/pull/550)) +* fix gaussian `norm()` calculation in `model_profile()` from `pi*sqrt(2)` to `sqrt(2*pi)` +* fix a warning (future error) between `prepare_numerical_categorical()` and `prepare_x()` with `pandas==2.1.0` +* fix a warning (future error) concerning the default value of `numeric_only` in `pandas.DataFrame.corr()` in `dalex.aspect.calculate_assoc_matrix()` ### v1.6.0 (2023-02-16) -* Add `ZeroDivisionError` to precision and recall functions ([#532](https://github.com/ModelOriented/DALEX/pull/532)) -* Add a warning to `calculate_depend_matrix()` when there is a variable with only one value ([#537](https://github.com/ModelOriented/DALEX/issues/537)) -* Fix missing EDA plots in (Python) Arena ([#544](https://github.com/ModelOriented/DALEX/issues/544)) -* Fix baseline positions in the subplots of the predict parts explanations: BreakDown, Shap ([#545](https://github.com/ModelOriented/DALEX/pull/545)) +* add `ZeroDivisionError` to precision and recall functions ([#532](https://github.com/ModelOriented/DALEX/pull/532)) +* add a warning to `calculate_depend_matrix()` when there is a variable with only one value ([#537](https://github.com/ModelOriented/DALEX/issues/537)) +* fix missing EDA plots in (Python) Arena ([#544](https://github.com/ModelOriented/DALEX/issues/544)) +* fix baseline positions in the subplots of the predict parts explanations: BreakDown, Shap ([#545](https://github.com/ModelOriented/DALEX/pull/545)) ### v1.5.0 (2022-09-07) *This release consists of mostly maintenance updates and, after a year, marks the Beta -> Stable release.* -* increase the dependency from `python>=3.6` to `python>=3.7` (at this moment, both `numpy` and `pandas` depend on `python>=3.8`), and add `python>=3.10` to CI +* increase the dependency from `python>=3.6` to `python>=3.7` (at this moment, both `numpy` and `pandas` depend on `python>=3.8`), and add `python==3.10` to CI * increase the dependencies to `pandas>=1.2.5`, `numpy>=1.20.3` ([#526](https://github.com/ModelOriented/DALEX/issues/526)), `scipy>=1.6.3`, `plotly>=5.1.0`, and `tqdm>=4.61.2` due to errors with `pandas` (see [tqdm/#1199](https://github.com/tqdm/tqdm/issues/1199)) * remove the use of `pd.Series.append()` ([#489](https://github.com/ModelOriented/DALEX/issues/489)) * remove the use of `np.isnan` causing error in `dalex.fairness` ([#491](https://github.com/ModelOriented/DALEX/issues/491)) diff --git a/python/dalex/dalex/predict_explanations/_ceteris_paribus/checks.py b/python/dalex/dalex/predict_explanations/_ceteris_paribus/checks.py index 8de7bc90e..37d675a4b 100644 --- a/python/dalex/dalex/predict_explanations/_ceteris_paribus/checks.py +++ b/python/dalex/dalex/predict_explanations/_ceteris_paribus/checks.py @@ -13,7 +13,7 @@ def check_variables(variables, explainer, variable_splits): variables_ = deepcopy(variables) if variable_splits is not None: variables_ = variable_splits.keys() - warnings.warn("Variables taken from variables_splits") + warnings.warn("Parameter `variable_splits` overrides `variables`. Variables taken from `variables_splits.keys()`.") elif variables_ is not None and isinstance(variables_, (list, np.ndarray, pd.Series)): if not set(variables_).issubset(explainer.data.columns): raise ValueError('Invalid variable names') diff --git a/python/dalex/setup.py b/python/dalex/setup.py index 701a10832..1d815f622 100644 --- a/python/dalex/setup.py +++ b/python/dalex/setup.py @@ -70,25 +70,25 @@ def run_setup(): "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "License :: OSI Approved", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", ], install_requires=[ 'setuptools', - 'pandas>=1.2.5', - 'numpy>=1.20.3', + 'pandas>=1.5.0', + 'numpy>=1.23.3', 'scipy>=1.6.3', 'plotly>=5.1.0', 'tqdm>=4.61.2', ], extras_require={'full': extras_require}, packages=find_packages(include=["dalex", "dalex.*"]), - python_requires='>=3.7', + python_requires='>=3.8', include_package_data=True ) diff --git a/tox.ini b/tox.ini index 515664640..7634e0a28 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{37,38,39,310}-{linux,macos,windows} +envlist = py{38,39,310,311}-{linux,macos,windows} toxworkdir={toxinidir}/python/dalex/.tox temp_dir={toxinidir}/python/dalex/.tmp setupdir={toxinidir}/python/dalex/ @@ -7,10 +7,10 @@ skip_missing_interpreters=true [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 [gh-actions:env] PLATFORM =