Add example on using custom params_to_tune
in Tune
#1281
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
run: | | |
poetry install -E style -vv | |
- name: Static Analysis | |
run: poetry run make lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.10'] | |
shard-id: [0, 1, 2] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry install -E "all jupyter tests" -vv | |
- name: PyTest with sharding | |
run: | | |
poetry run pytest tests -v --shard-id=${{ matrix.shard-id }} --num-shards=3 --cov=etna --cov-report=xml --durations=10 | |
poetry run pytest etna -v --doctest-modules --ignore=etna/libs --durations=10 | |
- name: Upload coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
test-pandas-versions: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pandas-version: | |
- ">=1.1,<1.2" | |
- ">=1.2,<1.3" | |
- ">=1.3,<1.4" | |
- ">=1.4,<1.5" | |
- ">=1.5,<2" | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
run: | | |
poetry install -E "all jupyter tests" -vv | |
poetry run pip install "pandas${{ matrix.pandas-version }}" | |
- name: PyTest ("tsdataset transforms") | |
run: | | |
poetry run pytest tests/test_datasets -v --cov=etna --cov-report=xml --durations=10 | |
poetry run pytest tests/test_transforms -v --cov=etna --cov-report=xml --durations=10 | |
poetry run pytest tests/test_models/test_utils.py -v --cov=etna --cov-report=xml --durations=10 | |
test-without-extras: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
run: | | |
poetry install -vv | |
- name: Check without extras | |
run: | | |
poetry run python scripts/check_without_extras.py |