-
-
Notifications
You must be signed in to change notification settings - Fork 389
110 lines (98 loc) · 5.39 KB
/
integrations.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: integrations
# <- standard block end ->
on:
push:
branches:
- master
pull_request:
branches:
- dev
- develop
- master
jobs:
build:
name: integrations
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [ubuntu-18.04, ubuntu-20.04] # windows-2019,
python-version: ["3.7", "3.8", "3.9", "3.10"]
requirements: [minimal, latest]
exclude:
- python-version: 3.9
requirements: minimal
- python-version: 3.10
requirements: minimal
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# https://github.com/pytorch/pytorch/issues/20030
- name: Setup macOS
if: ${{ startsWith(runner.os, 'macOS') }}
run: |
brew install libomp
brew install gnu-sed
- name: set minimal dependencies
if: ${{ matrix.requirements == 'minimal' }}
run: |
python -c "req = open('./requirements/requirements.txt').read().replace('>', '=') ; open('./requirements/requirements.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-cv.txt').read().replace('>', '=') ; open('./requirements/requirements-cv.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-ml.txt').read().replace('>', '=') ; open('./requirements/requirements-ml.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-optuna.txt').read().replace('>', '=') ; open('./requirements/requirements-optuna.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-comet.txt').read().replace('>', '=') ; open('./requirements/requirements-comet.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-mlflow.txt').read().replace('>', '=') ; open('./requirements/requirements-mlflow.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-neptune.txt').read().replace('>', '=') ; open('./requirements/requirements-neptune.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-wandb.txt').read().replace('>', '=') ; open('./requirements/requirements-wandb.txt', 'w').write(req)"
python -c "req = open('./requirements/requirements-profiler.txt').read().replace('>', '=') ; open('./requirements/requirements-profiler.txt', 'w').write(req)"
# https://github.com/actions/cache/blob/master/examples.md
# Note: This uses an internal pip API and may not always work
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
- name: get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: cache pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requirements }}-pip-${{ hashFiles('./requirements/requirements.txt') }}-${{ hashFiles('./requirements/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requirements }}-pip-
- name: cache pip contrib
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requirements }}-pip-contrib-${{ hashFiles('./requirements/requirements-cv.txt') }}-${{ hashFiles('./requirements/requirements-ml.txt') }}-${{ hashFiles('./requirements/requirements-optuna.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requirements }}-pip-contrib-
- name: cache pip loggers
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requirements }}-pip-loggers-${{ hashFiles('./requirements/requirements-comet.txt') }}-${{ hashFiles('./requirements/requirements-mlflow.txt') }}-${{ hashFiles('./requirements/requirements-neptune.txt') }}-${{ hashFiles('./requirements/requirements-wandb.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requirements }}-pip-loggers-
- name: install dependencies
run: |
# python -m pip install --upgrade --user pip
pip install -r ./requirements/requirements.txt -r ./requirements/requirements-dev.txt -r ./requirements/requirements-cv.txt -r ./requirements/requirements-ml.txt -r ./requirements/requirements-optuna.txt -r ./requirements/requirements-comet.txt -r ./requirements/requirements-mlflow.txt -r ./requirements/requirements-neptune.txt -r ./requirements/requirements-wandb.txt -r ./requirements/requirements-profiler.txt
python --version
pip --version
pip list
shell: bash
# <- standard block end ->
- name: check examples
env:
REQUIREMENTS: ${{ matrix.requirements }}
OMP_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
run: |
pip install -e .
bash bin/workflows/check_projector.sh
bash bin/workflows/check_settings.sh