Skip to content

Commit 5bba9be

Browse files
committed
Make travis test against all 0.3.x PyTorch (close #12)
- Remove torch version from requirements.txt - Ignore installed package - Upgrade certifi and cffi
1 parent e7a12b7 commit 5bba9be

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
language: python
2+
env:
3+
- PYTORCH_VERSION=0.3.0
4+
- PYTORCH_VERSION=0.3.1
25
before_install:
36
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
47
- bash ~/miniconda.sh -b -p $HOME/miniconda
58
- export PATH="$HOME/miniconda/bin:$PATH"
69
- conda update -y conda
710
- conda create -y -n pytorch-crf python=3.6
811
- source activate pytorch-crf
12+
- conda install -y -c pytorch pytorch=$PYTORCH_VERSION
913
# explicitly specify cudatoolkit version (see https://discuss.pytorch.org/t/libcudart-so-8-0-not-found-in-travis-ci/16071/3)
10-
- conda install -y -c pytorch pytorch=0.3.0 cudatoolkit=8.0
14+
- if [[ $PYTORCH_VERSION == "0.3.0" ]]; then conda install -y -c pytorch cudatoolkit=8.0; fi
1115
- export LD_LIBRARY_PATH="$HOME/miniconda/envs/pytorch-crf/lib:$LD_LIBRARY_PATH"
1216
install:
13-
- pip install -r requirements.txt
17+
- pip install --ignore-installed -r requirements.txt
1418
- pip install .
1519
script: pytest --cov
1620
after_success: coveralls

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
attrs==17.3.0
2-
certifi==2018.4.16
3-
cffi==1.10.0
2+
certifi==2018.10.15
3+
cffi==1.11.5
44
chardet==3.0.4
55
coverage==4.0.3
66
flake8==3.5.0
@@ -20,6 +20,5 @@ python-coveralls==2.9.1
2020
PyYAML==3.12
2121
requests==2.18.4
2222
six==1.11.0
23-
torch==0.3.0.post4
2423
typed-ast==1.1.0
2524
urllib3==1.22

0 commit comments

Comments
 (0)