diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8956a396..5476c0cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: name: test-no-extras strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] os: ["macos-latest", "windows-latest", "ubuntu-latest"] exclude: - os: "windows-latest" @@ -94,7 +94,7 @@ jobs: name: test-all-extras strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] os: ["macos-latest", "windows-latest", "ubuntu-latest"] exclude: - os: "windows-latest" @@ -135,7 +135,7 @@ jobs: fail-fast: false matrix: sklearn-version: ["1.5", "1.6", "1.7"] - python-version: ["3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 @@ -148,7 +148,7 @@ jobs: - name: Install dependencies for scikit-learn ${{ matrix.sklearn-version }} run: | python -m pip install --upgrade pip - python -m pip install .[all_extras,test] scikit-learn==${{ matrix.sklearn-version }} + python -m pip install .[all_extras,test] scikit-learn==${{ matrix.sklearn-version }}.* - name: Show dependencies run: python -m pip list diff --git a/pyproject.toml b/pyproject.toml index 53a20e88..edf59da6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ name = "hyperactive" version = "5.0.2" description = "An optimization and data collection toolbox for convenient and fast prototyping of computationally expensive models." readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = {file = "LICENSE"} keywords = ["visualization", "data-science"] authors = [ @@ -21,11 +21,11 @@ maintainers = [ ] classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Topic :: Scientific/Engineering :: Information Analysis", @@ -51,7 +51,7 @@ sklearn-integration = [ ] sktime-integration = [ "skpro", - "sktime", + 'sktime; python_version < "3.14"', ] build = [ "setuptools", @@ -63,7 +63,7 @@ test = [ "flake8", "pytest-cov", "pathos", - "torch", + 'torch; python_version < "3.14"', "tf_keras", ] test_parallel_backends = [ @@ -87,7 +87,7 @@ all_extras = [ [tool.ruff] line-length = 88 exclude = [".git", "examples/*"] -target-version = "py39" +target-version = "py310" extend-include = ["*.ipynb"] [tool.ruff.lint] diff --git a/src/hyperactive/experiment/integrations/torch_lightning_experiment.py b/src/hyperactive/experiment/integrations/torch_lightning_experiment.py index 886090bb..0bdd1f80 100644 --- a/src/hyperactive/experiment/integrations/torch_lightning_experiment.py +++ b/src/hyperactive/experiment/integrations/torch_lightning_experiment.py @@ -187,7 +187,7 @@ def _evaluate(self, params): ) if hasattr(val_result, "item"): val_result = np.float64(val_result.detach().cpu().item()) - elif isinstance(val_result, (int, float)): + elif isinstance(val_result, int | float): val_result = np.float64(val_result) else: val_result = np.float64(float(val_result)) diff --git a/src/hyperactive/opt/optuna/_gp_optimizer.py b/src/hyperactive/opt/optuna/_gp_optimizer.py index 2735bea0..9b800469 100644 --- a/src/hyperactive/opt/optuna/_gp_optimizer.py +++ b/src/hyperactive/opt/optuna/_gp_optimizer.py @@ -59,7 +59,7 @@ class GPOptimizer(_BaseOptunaAdapter): "info:local_vs_global": "global", "info:explore_vs_exploit": "exploit", "info:compute": "high", - "python_dependencies": ["optuna"], + "python_dependencies": ["optuna", "torch"], } def __init__(