38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
name: UnitTests for Autotune Module
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, edited]
|
|
|
|
jobs:
|
|
run:
|
|
if: false == contains(github.event.pull_request.title, 'WIP')
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 20
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
python-version: ['3.9']
|
|
torch-version: ['1.10.1']
|
|
torchvision-version: ['0.11.2']
|
|
torchaudio-version: ['0.10.1']
|
|
env:
|
|
OS: ${{ matrix.os }}
|
|
PYTHON: '3.9'
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@master
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install PyTorch ${{ matrix.torch-version }}+cpu
|
|
run: |
|
|
pip install numpy typing-extensions dataclasses
|
|
pip install torch==${{ matrix.torch-version}}+cpu torchvision==${{matrix.torchvision-version}}+cpu torchaudio==${{matrix.torchaudio-version}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
|
|
- name: Install FS
|
|
run: |
|
|
pip install -e .[test,hpo]
|
|
- name: Test Autotune
|
|
run: |
|
|
python federatedscope/hpo.py --cfg federatedscope/autotune/baseline/fedhpo_vfl.yaml
|
|
[ $? -eq 1 ] && exit 1 || echo "Passed" |