This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
90 lines (80 loc) · 3.13 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Development
on: [push, pull_request]
jobs:
test_linux_ray_master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U pytest
python -m pip install codecov
python -m pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
python -m pip install -U -q scikit-learn scikit-optimize hyperopt hpbandster ConfigSpace scipy dataclasses optuna keras
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
- name: Install package
run: |
python -m pip install -e .
- name: Test with pytest
run: |
export SKLEARN_N_JOBS=1
cd tests
python -m pytest -v --durations=0 -x test_randomizedsearch.py
python -m pytest -v --durations=0 -x test_gridsearch.py
python -m pytest -v --durations=0 -x test_trainable.py
declare -a arr=("AsyncHyperBandScheduler" "HyperBandScheduler" "MedianStoppingRule" "ASHAScheduler"); for s in "${arr[@]}"; do python schedulers.py --scheduler "$s"; done
chmod +x ./run_examples.sh
bash ./run_examples.sh
test_linux_ray_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U pytest
python -m pip install codecov
python -m pip install -U ray
python -m pip install -U -q scikit-learn scikit-optimize hyperopt hpbandster ConfigSpace scipy dataclasses optuna keras
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
- name: Install package
run: |
python -m pip install -e .
- name: Test with pytest
run: |
export SKLEARN_N_JOBS=1
cd tests
python -m pytest -v --durations=0 -x test_randomizedsearch.py
python -m pytest -v --durations=0 -x test_gridsearch.py
python -m pytest -v --durations=0 -x test_trainable.py
declare -a arr=("AsyncHyperBandScheduler" "HyperBandScheduler" "MedianStoppingRule" "ASHAScheduler"); for s in "${arr[@]}"; do python schedulers.py --scheduler "$s"; done
chmod +x ./run_examples.sh
bash ./run_examples.sh
test_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
export LINT=1 PYTHONWARNINGS=ignore
python -m pip install --upgrade pip
python -m pip install yapf==0.23.0 flake8==3.7.7 flake8-comprehensions flake8-quotes==2.0.0
- name: Lint codebase
run: |
chmod +x ./tests/format.sh
bash ./tests/format.sh