diff --git a/.github/workflows/pytorch-version-tests.yml b/.github/workflows/pytorch-version-tests.yml new file mode 100644 index 00000000000..383342bf272 --- /dev/null +++ b/.github/workflows/pytorch-version-tests.yml @@ -0,0 +1,51 @@ +on: + schedule: + # Run at 00:00 UTC on Sunday + - cron: '0 0 * * 0' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + fail-fast: false + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + pytorch-version: [1.4.0, 1.3.1, 1.2.0, 1.1.0, 1.0.1] + exclude: + - pytorch-version: 1.3.1 + python-version: 3.8 + - pytorch-version: 1.2.0 + python-version: 3.8 + - pytorch-version: 1.1.0 + python-version: 3.8 + - pytorch-version: 1.0.1 + python-version: 3.8 + + steps: + - uses: actions/checkout@v2 + - name: Setup Conda + run: | + 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" + 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 pytorch=${{ matrix.pytorch-version }} cpuonly python=${{ matrix.python-version }} -c pytorch + + - name: Install dependencies + run: | + export PATH="$HOME/miniconda/bin:$PATH" + source activate test-environment + # Keep fix in case of problem with torchvision nightly releases + conda install torchvision cpuonly python=${{ matrix.python-version }} -c pytorch + pip install -r requirements-dev.txt + python setup.py install + + - name: Run Tests + run: | + export PATH="$HOME/miniconda/bin:$PATH" + source activate test-environment + py.test tests -vvv diff --git a/.github/workflows/tpu-tests.yaml b/.github/workflows/tpu-tests.yml similarity index 100% rename from .github/workflows/tpu-tests.yaml rename to .github/workflows/tpu-tests.yml diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 1af97970725..4e3f793786e 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -16,11 +16,11 @@ requirements: build: - python - setuptools - - pytorch + - pytorch 1.*.* run: - python - - pytorch + - pytorch 1.*.* test: imports: diff --git a/setup.py b/setup.py index ce7f00845d5..667c5b279bd 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def find_version(*file_paths): VERSION = find_version("ignite", "__init__.py") requirements = [ - "torch", + "torch>=1.0,<2", ] setup(