Skip to content

Commit

Permalink
Merge pull request #747 from keisuke-umezawa/feature/deprecate-optuna-v2
Browse files Browse the repository at this point in the history
Change requirements to optuna>=3.1.0
  • Loading branch information
keisuke-umezawa authored Jan 23, 2024
2 parents 6c7dc62 + 736d2ee commit 44f690e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/e2e-dashboard-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
optuna-version: ['optuna==2.10.0', 'git+https://github.com/optuna/optuna.git']
optuna-version: ['optuna==3.1.0', 'git+https://github.com/optuna/optuna.git']
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -48,9 +48,4 @@ jobs:

- name: Run e2e tests
run: |
if [ "${{ matrix.optuna-version }}" = "optuna==2.10.0" ]; then
ignore_option="--ignore e2e_tests/test_dashboard/test_usecases/test_preferential_optimization.py"
else
ignore_option=""
fi
pytest e2e_tests/test_dashboard $ignore_option
pytest e2e_tests/test_dashboard
1 change: 0 additions & 1 deletion .github/workflows/python-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off .[optional]
pip install --progress-bar off .[test]
pip install --progress-bar off "optuna>=3.0.0"
pip install --progress-bar off .
echo 'import coverage; coverage.process_startup()' > sitecustomize.py
- name: Tests
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ jobs:
python-version: '3.10'
architecture: x64
- name: Install dependencies
# python_tests requires optuna>=3.0.0 since it imports FloatDistribution
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off "optuna>=3.0.0"
pip install --progress-bar off .
pip install --progress-bar off flake8 black isort mypy mypy-boto3-s3
- run: flake8 . --show-source
Expand All @@ -32,25 +30,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# Add Python '3.11' after released Optuna v3.1
# since Optuna v3.0.4 depends on scipy<1.9.0 and >=1.7.0
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
optuna-version: ['optuna>=3.1.0']
steps:
- uses: actions/checkout@v2
- name: Setup Python${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
# python_tests requires optuna>=3.0.0 since it imports FloatDistribution
- name: Setup Optuna ${{ matrix.optuna-version }}
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
python -m pip install --progress-bar off --upgrade ${{ matrix.optuna-version }}
- name: Install dependencies
run: |
pip install --progress-bar off .[optional]
pip install --progress-bar off .[test]
pip install --progress-bar off "optuna>=3.0.0"
pip install --progress-bar off .
- run: pytest python_tests
- name: Run python unit tests
run: |
pytest python_tests
test-with-optuna-master:
runs-on: ubuntu-latest
steps:
Expand All @@ -67,4 +67,6 @@ jobs:
pip install --progress-bar off .[test]
pip install --progress-bar off .
python -m pip install --progress-bar off --upgrade git+https://github.com/optuna/optuna.git
- run: pytest python_tests
- name: Run python unit tests
run: |
pytest python_tests
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
]
dependencies = [
"bottle",
"optuna>=2.4.0",
"optuna>=3.1.0",
"packaging",
"scikit-learn",
]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# project dependency
optuna>=2.4
optuna>=3.1
bottle
scikit-learn
streamlit
Expand Down

0 comments on commit 44f690e

Please sign in to comment.