Skip to content

Commit

Permalink
Pytorch version tests. (facebookresearch#1919)
Browse files Browse the repository at this point in the history
* Tests for pytorch1.1 and pytorch1.2

* Mention pytorch requirement.
  • Loading branch information
stephenroller authored Aug 13, 2019
1 parent ecb0240 commit f783caf
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
44 changes: 36 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,26 @@ installdeps: &installdeps
python setup.py develop
python -c "import nltk; nltk.download('punkt')"
installtorchgpu: &installtorchgpu
installtorchgpu11: &installtorchgpu11
run:
name: Install torch GPU and dependencies
command: |
pip3 install --progress-bar off torch
pip3 install --progress-bar off 'torch<1.2.0'
pip3 install --progress-bar off 'git+https://github.com/rsennrich/subword-nmt.git#egg=subword-nmt' # bpe support
pip3 install --progress-bar off pytorch-pretrained-bert
pip3 install --progress-bar off torchtext
installtorchgpu12: &installtorchgpu12
run:
name: Install torch GPU and dependencies
command: |
pip3 install --progress-bar off 'torch>=1.2.0'
pip3 install --progress-bar off 'git+https://github.com/rsennrich/subword-nmt.git#egg=subword-nmt' # bpe support
pip3 install --progress-bar off pytorch-pretrained-bert
pip3 install --progress-bar off torchtext
installtorchcpuosx: &installtorchcpuosx
run:
name: Install torch CPU and dependencies
Expand Down Expand Up @@ -158,7 +169,7 @@ jobs:
name: Unit tests (py37)
command: python setup.py test -s tests.suites.unittests -v

unittests_gpu:
unittests_gpu11:
<<: *gpu
working_directory: ~/ParlAI
steps:
Expand All @@ -167,10 +178,25 @@ jobs:
- <<: *setupcuda
- <<: *setup
- <<: *installdeps
- <<: *installtorchgpu
- <<: *installtorchgpu11
- run:
name: Unit tests (GPU)
name: Unit tests (GPU; pytorch 1.1)
command: python setup.py test -s tests.suites.unittests -v

unittests_gpu12:
<<: *gpu
working_directory: ~/ParlAI
steps:
- checkout
- <<: *fixgit
- <<: *setupcuda
- <<: *setup
- <<: *installdeps
- <<: *installtorchgpu12
- run:
name: Unit tests (GPU; pytorch 1.2)
command: python setup.py test -s tests.suites.unittests -v

black:
<<: *standard_cpu36
working_directory: ~/ParlAI
Expand Down Expand Up @@ -223,7 +249,7 @@ jobs:
- <<: *setupcuda
- <<: *setup
- <<: *installdeps
- <<: *installtorchgpu
- <<: *installtorchgpu12
- run:
name: Nightly GPU tests
no_output_timeout: 60m
Expand Down Expand Up @@ -325,7 +351,8 @@ workflows:
jobs:
- black
- lint
- unittests_gpu
- unittests_gpu11
- unittests_gpu12
- unittests_37
- unittests_36
- unittests_osx
Expand Down Expand Up @@ -359,7 +386,8 @@ workflows:
jobs:
- unittests_36
- unittests_37
- unittests_gpu
- unittests_gpu11
- unittests_gpu12
- unittests_osx
- mturk_tests
- nightly_gpu_tests
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ See the [news page](https://github.com/facebookresearch/ParlAI/blob/master/NEWS.

## Installing ParlAI

ParlAI currently requires Python3. Dependencies of the core modules are listed in `requirement.txt`. Some models included (in `parlai/agents`) have additional requirements.
ParlAI currently requires Python3 and [Pytorch](https://pytorch.org) 1.1 or
newer. Dependencies of the core modules are listed in `requirement.txt`. Some
models included (in `parlai/agents`) have additional requirements.

Run the following commands to clone the repository and install ParlAI:

Expand Down

0 comments on commit f783caf

Please sign in to comment.