-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (38 loc) · 1.48 KB
/
.travis.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
language: python
python:
- "2.7"
- "3.5"
install:
- sudo apt-get update
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda create -q -n test-environment -c pytorch python=$TRAVIS_PYTHON_VERSION numpy mock pytorch
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install enum34; fi
- source activate test-environment
- python setup.py install
- pip install --upgrade pytest
- pip
script:
- pytest tests/
# Smoke tests for the examples
# classification/cifar_10
- python classification/cifar_10/cifar10_train_playground.py --epochs=1 --model=squeezenet_v1_1_bn --output=cifar10_output
- checkpoint=`ls cifar10_output/training_*/model* -1 | tail -n 1`
- python classification/cifar_10/cifar10_eval_playground.py $checkpoint --n_tta=2
- rm -rf cifar10_output
- python classification/cifar_10/cifar10_train_playground.py --epochs=1 --model=squeezenet_v1_1 --output=cifar10_output
- checkpoint=`ls cifar10_output/training_*/model* -1 | tail -n 1`
- python classification/cifar_10/cifar10_eval_playground.py $checkpoint --n_tta=2
- rm -rf cifar10_output
matrix:
include:
- env: LINT_CHECK
python: "2.7"
install: pip install flake8
script: flake8