Skip to content

Limit the maximum number of trials to be added for the quicker first response #922

Limit the maximum number of trials to be added for the quicker first response

Limit the maximum number of trials to be added for the quicker first response #922

Workflow file for this run

name: tests
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/python-tests.yml'
- '**.py'
- 'pyproject.toml'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
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
- run: black --check --diff .
- run: isort --check --diff .
- run: mypy optuna_dashboard python_tests
test:
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']
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
run: |
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 .
- run: pytest python_tests
test-with-optuna-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64
- name: Install dependencies
run: |
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 .
python -m pip install --progress-bar off --upgrade git+https://github.com/optuna/optuna.git
- run: pytest python_tests