Add wait_for_first_optimizer_step mode #292
Workflow file for this run
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: "Pre-review Tests" | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
torch: ['1.10.*', '1.11.*', '1.12.*', '1.13.*', '2.0.*'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{ matrix.torch }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install | |
run: | | |
pip install -U pip wheel | |
pip install 'torch==${{ matrix.torch }}' --extra-index-url https://download.pytorch.org/whl/cpu | |
pip install -v -e . | |
# Test PPE is importable with minimum dependency | |
python -c 'import pytorch_pfn_extras' | |
- name: Code Style | |
run: | | |
pip install pysen black==23.3.0 flake8==4.0.1 isort==5.10.1 mypy==0.991 | |
pip install types-PyYAML types-setuptools | |
cp "$(pip show torch | awk '/^Location:/ { print $2 }')/torch/__init__.py" stubs/torch/__init__.py | |
MYPYPATH="${PWD}/stubs" pysen run lint | |
- name: Code Style (Examples) | |
run: | | |
pysen --config ./example/pysen.toml run lint | |
- name: Install for pytest | |
run: | | |
pip install matplotlib tensorboard ipython ipywidgets pandas optuna onnx pytorch-ignite | |
pip install -v -e '.[test]' 'torch==${{ matrix.torch }}' --extra-index-url https://download.pytorch.org/whl/cpu | |
pip list -v | |
# Test PPE is importable with pytest dependency | |
python -c 'import pytorch_pfn_extras' | |
- name: Test CPU only | |
run: | | |
pytest -m "not gpu" tests |