diff --git a/.github/workflows/ci_dockers.yml b/.github/workflows/ci_dockers.yml
index 16f86e0759fce..47b839a54d04d 100644
--- a/.github/workflows/ci_dockers.yml
+++ b/.github/workflows/ci_dockers.yml
@@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
python_version: [3.6]
- pytorch_version: [1.3, 1.7]
+ pytorch_version: [1.4, 1.7]
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -74,7 +74,7 @@ jobs:
- python_version: 3.7
pytorch_version: 1.6
- python_version: 3.6
- pytorch_version: 1.3
+ pytorch_version: 1.4
steps:
- name: Checkout
uses: actions/checkout@v2
diff --git a/.github/workflows/ci_test-conda.yml b/.github/workflows/ci_test-conda.yml
index d64fedbfbe590..15797ff59e981 100644
--- a/.github/workflows/ci_test-conda.yml
+++ b/.github/workflows/ci_test-conda.yml
@@ -16,7 +16,7 @@ jobs:
matrix:
# os: [ubuntu-20.04]
python-version: [3.7]
- pytorch-version: [1.3, 1.4, 1.5, 1.6, 1.7, 1.8]
+ pytorch-version: [1.4, 1.5, 1.6, 1.7, 1.8]
# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 35
diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml
index 719b374d76efb..c42b9732a8d5a 100644
--- a/.github/workflows/ci_test-full.yml
+++ b/.github/workflows/ci_test-full.yml
@@ -52,23 +52,6 @@ jobs:
open(fname, 'w').writelines(lines)
shell: python
- # versions <= 1.3 may have issues on mac with some BLAS ops due to missing mkl (https://github.com/pytorch/pytorch/issues/18996)
- - name: Adjust minimal for Python 3.8 and MacOS
- if: matrix.requires == 'minimal' && (runner.os == 'macOS' || matrix.python-version == 3.8)
- run : |
- fname = 'requirements.txt'
- req = open(fname).read().replace('torch>=1.3', 'torch>=1.4')
- open(fname, 'w').write(req)
-
- fname = 'requirements/examples.txt'
- req = open(fname).read().replace('torchvision>=0.4.1', 'torchvision>=0.5.0')
- open(fname, 'w').write(req)
-
- fname = 'requirements/extra.txt'
- req = open(fname).read().replace('torchtext>=0.3.1', 'torchtext>=0.5.0')
- open(fname, 'w').write(req)
- shell: python
-
- name: Set min. dependencies
if: matrix.requires == 'minimal'
run: |
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index eb3e55268b682..61a553d545732 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -85,11 +85,7 @@ jobs:
fail-fast: false
matrix:
python_version: [3.6, 3.7, 3.8]
- pytorch_version: [1.3, 1.4, 1.5, 1.6, 1.7, 1.8]
- exclude:
- # excludes PT 1.3 as it is missing on pypi
- - python_version: 3.8
- pytorch_version: 1.3
+ pytorch_version: [1.4, 1.5, 1.6, 1.7, 1.8]
steps:
- name: Checkout
diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml
index 3543891cf7698..ab8dbed24288e 100644
--- a/.github/workflows/release-docker.yml
+++ b/.github/workflows/release-docker.yml
@@ -14,11 +14,7 @@ jobs:
fail-fast: false
matrix:
python_version: [3.6, 3.7, 3.8]
- pytorch_version: [1.3, 1.4, 1.5, 1.6, 1.7]
- exclude:
- # excludes PT 1.3 as it is missing on pypi
- - python_version: 3.8
- pytorch_version: 1.3
+ pytorch_version: [1.4, 1.5, 1.6, 1.7]
steps:
- name: Checkout
uses: actions/checkout@v2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb1963d64d954..9a4abf77b2a17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Changed `iou` [func] to allow float input ([#4704](https://github.com/PyTorchLightning/pytorch-lightning/pull/4704))
+- Set PyTorch 1.4 as min requirements, also for testing and examples `torchvision>=0.5` and `torchtext>=0.5` ([#5418](https://github.com/PyTorchLightning/pytorch-lightning/pull/5418))
+
+
- Changed `callbacks` argument in `Trainer` to allow `Callback` input ([#5446](https://github.com/PyTorchLightning/pytorch-lightning/pull/5446))
diff --git a/README.md b/README.md
index cd9eb7cf02fc2..29abbd5aa5784 100644
--- a/README.md
+++ b/README.md
@@ -81,16 +81,15 @@ Lightning can automatically export to ONNX or TorchScript for those cases.
## Continuous Integration
-| System / PyTorch ver. | 1.3 (min. req.)* | 1.4 | 1.5 | 1.6 | 1.7 (latest) | 1.8 (nightly) |
-| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
-| Conda py3.7 [linux] | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) |
-| Linux py3.7 [GPUs**] | - | - | - | [![GPUs Status](http://104.154.220.231/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - | - |
-| Linux py3.{6,7} [TPUs***] | - | - | - | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | - |
-| Linux py3.{6,7} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - |
-| OSX py3.{6,7,8} | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - |
-| Windows py3.{6,7,8} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - |
-
-- _\* `torch>=1.4` is the minimal pytorch version for Python 3.8_
+| System / PyTorch ver. | 1.4 (min. req.)* | 1.5 | 1.6 | 1.7 (latest) | 1.8 (nightly) |
+| :---: | :---: | :---: | :---: | :---: | :---: |
+| Conda py3.7 [linux] | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) |
+| Linux py3.7 [GPUs**] | - | - | [![GPUs Status](http://104.154.220.231/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - | - |
+| Linux py3.{6,7} [TPUs***] | - | - | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) |
+| Linux py3.{6,7} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - |
+| OSX py3.{6,7,8} | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - |
+| Windows py3.{6,7,8} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - |
+
- _\** tests run on two NVIDIA K80_
- _\*** tests run on Google GKE TPUv2/3_
- _TPU w/ py3.6/py3.7 means we support Colab and Kaggle env._
diff --git a/dockers/base-conda/Dockerfile b/dockers/base-conda/Dockerfile
index 3c58dfcde7dea..8107d431aadbf 100644
--- a/dockers/base-conda/Dockerfile
+++ b/dockers/base-conda/Dockerfile
@@ -17,7 +17,6 @@
# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.6 --build-arg PYTORCH_CHANNEL=pytorch
# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.5 --build-arg PYTORCH_CHANNEL=pytorch
# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.4 --build-arg PYTORCH_CHANNEL=pytorch
-# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.3 --build-arg PYTORCH_CHANNEL=pytorch
ARG CUDNN_VERSION=8
ARG CUDA_VERSION=10.2
diff --git a/dockers/base-cuda/Dockerfile b/dockers/base-cuda/Dockerfile
index bdaf271f2b854..92b8e06cc47a5 100644
--- a/dockers/base-cuda/Dockerfile
+++ b/dockers/base-cuda/Dockerfile
@@ -17,7 +17,6 @@
# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.6 --build-arg CUDA_VERSION=10.2
# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.5 --build-arg CUDA_VERSION=10.2
# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.4 --build-arg CUDA_VERSION=10.1
-# --build-arg PYTHON_VERSION=3.7 --build-arg PYTORCH_VERSION=1.3 --build-arg CUDA_VERSION=10.1
ARG CUDNN_VERSION=8
ARG CUDA_VERSION=10.2
diff --git a/environment.yml b/environment.yml
index 1278f15f718e9..7e702c7d4bc00 100644
--- a/environment.yml
+++ b/environment.yml
@@ -26,7 +26,7 @@ dependencies:
- python>=3.6
- pip>20.1
- numpy>=1.16.4
- - pytorch>=1.3,<1.8
+ - pytorch>=1.4
- future>=0.17.1
- PyYAML>=5.1
- tqdm>=4.41.0
@@ -38,10 +38,10 @@ dependencies:
- scikit-learn>=0.20.0
- matplotlib>=3.1.1
- omegaconf>=2.0.0
- - torchtext>=0.3.1
+ - torchtext>=0.5
# Examples
- - torchvision>=0.4.1,<0.9.0
+ - torchvision>=0.5
- pip:
- test-tube>=0.7.5
diff --git a/requirements.txt b/requirements.txt
index 2dd5378649851..339dbd0ec2240 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
# the default package dependencies
numpy>=1.16.6
-torch>=1.3
+torch>=1.4
future>=0.17.1 # required for builtins in setup.py
# pyyaml>=3.13
PyYAML>=5.1 # OmegaConf requirement >=5.1
diff --git a/requirements/examples.txt b/requirements/examples.txt
index c87d10a39346f..c6ee7bff0dff5 100644
--- a/requirements/examples.txt
+++ b/requirements/examples.txt
@@ -1,2 +1,2 @@
-torchvision>=0.4.1
+torchvision>=0.5
gym>=0.17.0
\ No newline at end of file
diff --git a/requirements/extra.txt b/requirements/extra.txt
index 3f14b1e5910dd..a44695cfc60fa 100644
--- a/requirements/extra.txt
+++ b/requirements/extra.txt
@@ -3,7 +3,7 @@
matplotlib>3.1
horovod>=0.20.2 # no need to install with [pytorch] as pytorch is already installed
omegaconf>=2.0.1
-torchtext>=0.3.1, <0.7 # TODO: temporary fix fix for compatibility
+torchtext>=0.5, <0.7 # TODO: temporary fix fix for compatibility
onnx>=1.7.0
onnxruntime>=1.3.0
hydra-core>=1.0