Skip to content

Commit 13bd1e9

Browse files
d4l3kfacebook-github-bot
authored andcommitted
switch to torch 1.10 (#295)
Summary: Pull Request resolved: #295 Reviewed By: kiukchung, aivanou Differential Revision: D31832289 Pulled By: d4l3k fbshipit-source-id: 9b18dceed75d6d80a20727f4f88597a856566a89
1 parent 8226743 commit 13bd1e9

File tree

3 files changed

+7
-32
lines changed

3 files changed

+7
-32
lines changed

.github/workflows/python-unittests.yaml

+3-14
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@ jobs:
1010
unittest:
1111
strategy:
1212
matrix:
13+
python-version: [3.7, 3.8, 3.9]
14+
platform: [ubuntu-18.04]
1315
include:
14-
# TODO: uncomment this when torch.1-10 is released
15-
# - python-version: 3.9
16-
# platform: macos-latest
17-
# TODO: remove this when torch.1-10 is released
18-
- python-version: 3.7
19-
platform: ubuntu-18.04
20-
torch-whl: https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp37-cp37m-linux_x86_64.whl
21-
- python-version: 3.8
22-
platform: ubuntu-18.04
23-
torch-whl: https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp38-cp38-linux_x86_64.whl
2416
- python-version: 3.9
25-
platform: ubuntu-18.04
26-
torch-whl: https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp39-cp39-linux_x86_64.whl
17+
platform: macos-latest
2718
fail-fast: false
2819
runs-on: ${{ matrix.platform }}
2920
steps:
@@ -39,8 +30,6 @@ jobs:
3930
set -eux
4031
pip install coverage codecov
4132
pip install -e .[dev]
42-
pip uninstall -y torch
43-
pip install ${{ matrix.torch-whl }}
4433
- name: Run tests
4534
run: coverage run -m unittest discover --verbose --start-directory . --pattern "*_test.py"
4635
- name: Coverage

dev-requirements.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ pyre-extensions>=0.0.21
55
black>=21.5b1
66
usort==0.6.4
77
pytorch-lightning>=1.4.9
8-
torch>=1.9.0
9-
torchvision>=0.10.0
8+
torch>=1.10.0
9+
torchvision>=0.11.1
10+
torchtext>=0.11.0
1011
classy-vision>=0.6.0
1112
flake8==3.9.0
1213
ts>=0.5.1

torchx/runtime/container/Dockerfile

+1-16
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,12 @@ FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime
22

33
RUN pip install fsspec[s3]
44

5-
# Note: the pytorch image installs version of the torchvision that is not compatible
6-
# with CUDA. By using it directly there will be a segfault.
7-
RUN pip uninstall -y torchvision
8-
RUN pip install torchvision
9-
105
WORKDIR /app
116

127
# copy requirements early so we don't have to redownload dependencies on code
138
# changes
149
COPY dev-requirements.txt /app
15-
RUN pip install -r dev-requirements.txt
16-
17-
# TODO: Remove this and get dependency on torch 1.10 when it is released
18-
19-
RUN pip uninstall -y torch
20-
21-
RUN pip install https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp37-cp37m-linux_x86_64.whl
22-
23-
RUN pip uninstall -y torchtext
24-
25-
RUN pip install https://download.pytorch.org/whl/test/torchtext-0.10.0-cp37-cp37m-linux_x86_64.whl
10+
RUN pip install --upgrade -r dev-requirements.txt
2611

2712
COPY . /app
2813

0 commit comments

Comments
 (0)