forked from rwth-i6/returnn
-
Notifications
You must be signed in to change notification settings - Fork 0
175 lines (158 loc) · 5.58 KB
/
Copy pathmain.yml
File metadata and controls
175 lines (158 loc) · 5.58 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- 3.7
tf-version:
- 2.3.0
action:
- TEST=TFEngine
- TEST=TFNativeOp
- TEST=TFNetworkLayer
- TEST=TFNetworkRecLayer
- TEST=TFUpdater
- TEST=TFUtil
- TEST=Config
- TEST=Dataset
- TEST=Device
- TEST=EngineTask
- TEST=EngineUtil
- TEST=fork_exec
- TEST=Fsa
- TEST=GeneratingDataset
- TEST=hdf_dump
- TEST=HDFDataset
- TEST=TranslationDataset
- TEST=LearningRateControl
- TEST=Log
- TEST=multi_target
- TEST=NativeOp_chunk
- TEST=NativeOp_sparse
- TEST=NativeOp_subtensor_batched_index
- TEST=Network
- TEST=NetworkBaseLayer
- TEST=NetworkDescription
- TEST=NetworkLayer
- TEST=Pretrain
- TEST=SprintDataset
- TEST=SprintInterface
- TEST=TaskSystem
- TEST=TaskSystem_SharedMem
- TEST=TheanoUtil
- TEST=Util
include:
- action: TEST=TFUtil
python-version: 2.7
tf-version: 1.14.0
- action: TEST=TFUtil
python-version: 3.7
tf-version: 1.15.3
- action: TEST=TFEngine
python-version: 2.7
tf-version: 1.15.0
- action: TEST=TFEngine
python-version: 3.7
tf-version: 1.15.3
- action: TEST=TFNativeOp
python-version: 2.7
tf-version: 1.4.0
- action: TEST=TFNativeOp
python-version: 3.6
tf-version: 1.8.0
- action: TEST=TFNativeOp
python-version: 3.7
tf-version: 1.14.0
- action: TEST=TFNetworkSigProcLayer
python-version: 3.7
tf-version: 1.15.3
- action: TEST=demos
python-version: 3.6
tf-version: 2.3.0
- action: TEST=MultiBatchBeam
python-version: 3.6
tf-version: 2.3.0
- action: TEST=NativeOp
python-version: 3.6
tf-version: 2.3.0
- action: TEST=SprintDataset
python-version: 2.7
tf-version: 1.15.0
- action: TEST=SprintInterface
python-version: 2.7
tf-version: 1.15.0
- action: RUN=tests/pycharm-inspect.py
python-version: 3.7
tf-version: 2.3.0
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache
~/.local
key: cache-${{ runner.os }}-py${{ matrix.python-version }}-tf${{ matrix.tf-version }}
restore-keys: |
cache-${{ runner.os }}-py${{ matrix.python-version }}-
- name: Setup dependencies
run: |
echo "PATH=$PATH:~/.local/bin" >> $GITHUB_ENV
echo "Python ${{matrix.python-version}}"
echo "pip: $(type pip)"
echo "pip2: $(type pip2)"
pip2 install -qq --upgrade pip setuptools wheel six | cat # Python2<->Python3
pip2 install --user -r requirements.txt | cat # need for Python2<->Python3 communication tests
pip2 install --user typing | cat
pip install --user --upgrade pip setuptools wheel
pip install --user typing | cat # needed for Python 2 in some cases
if [ "${{matrix.python-version}}" == "2.7" ]; then
echo "Cleaning ub potential messed up tensorboard for Python 2.7."
echo "Current site-packages:"
ls ~/.local/lib/python2.7/site-packages
# https://github.com/tensorflow/tensorboard/issues/1862#issuecomment-521876133
rm -rf ~/.local/lib/python2.7/site-packages/tensorboard* || true
fi
pip install --user -r requirements.txt | cat
pip install --user --upgrade tensorflow==${{ matrix.tf-version }} | cat
pip install --user theano==0.9 | cat
pip install --user nose
# Theano setup.
echo "[global]" >> ~/.theanorc
echo "device = cpu" >> ~/.theanorc
echo "floatX = float32" >> ~/.theanorc
# Enforce the right Python interpreter for nosetests.
echo "#!/usr/bin/env python" > ~/nosetests
cat ~/.local/bin/nosetests >> ~/nosetests
chmod +x ~/nosetests
mv ~/nosetests ~/.local/bin/nosetests
- name: Test Python/Numpy/TF/Theano versions.
run: |
echo "Python env: $(type python) $(python --version)"
python -c "import numpy; print('NumPy:', numpy.version.full_version)"
python -c "import tensorflow as tf; print('TensorFlow:', tf.__git_version__, tf.__version__, tf.__file__)"
python -c "import tensorflow as tf; assert tf.__version__ == '${{ matrix.tf-version }}'"
python -c "import theano; print('Theano:', theano.__version__)"
echo "Nosetests env: $(type nosetests)"
nosetests -V
- name: Cache PyCharm
if: matrix.action == 'RUN=tests/pycharm-inspect.py'
uses: actions/cache@v2
with:
path: |
~/.cache/JetBrains
key: cache-pycharm-${{ runner.os }}-py${{ matrix.python-version }}-tf${{ matrix.tf-version }}
- name: Run test
run: |
export ${{ matrix.action }}
if [[ ! -z "$TEST" ]]; then nosetests tests/test_$TEST.py; fi
if [[ ! -z "$RUN" ]]; then $RUN; fi