Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT update GitHub workflows #892

Merged
merged 15 commits into from
Jun 21, 2022
Merged

MAINT update GitHub workflows #892

merged 15 commits into from
Jun 21, 2022

Conversation

lostanlen
Copy link
Collaborator

A proposed fix for Muawiz's

Looking at making the jenkins and github workflows use pytorch 1.10, 1.11, instead of 1.7, 1.8, would be baller.

Except i think it would be more secure to set the widest version span possible. So i propose:

python-version = [3.6, 3.10]
pytorch-version = [1.7, 1.9, 1.11]

Note that i have remove Python 3.5 (hence the PR name), which has reached EOL and is throwing a DeprecationWarning in the test suite.

I have also removed Torch 1.5, which was released in April 2020.

python-version = [3.6, 3.10]
pytorch-version = [1.7, 1.9, 1.11]
@lostanlen
Copy link
Collaborator Author

GitHub has parsed my python-version: 3.10 as 3.1. It's going great.

@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2022

Codecov Report

Merging #892 (0f9b6b6) into dev (e89ec79) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #892   +/-   ##
=======================================
  Coverage   87.94%   87.94%           
=======================================
  Files          64       64           
  Lines        2257     2257           
=======================================
  Hits         1985     1985           
  Misses        272      272           
Flag Coverage Δ
jenkins_main 87.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e89ec79...0f9b6b6. Read the comment docs.

@lostanlen lostanlen mentioned this pull request Jun 19, 2022
@lostanlen
Copy link
Collaborator Author

@MuawizChaudhary OK, it's working. Note the new testing matrix:

                python-version: ['3.7', '3.9]
                pytorch-version: ['1.7', '1.9', '1.11']

Any other python-torch pair we want to test?

@lostanlen lostanlen added this to the 0.3.alpha milestone Jun 19, 2022
@lostanlen
Copy link
Collaborator Author

lostanlen commented Jun 19, 2022

I vote for saying: "Kymatio may work on Python as old as 3.5 and as recent as 3.10, but we make no promises outside of the 3.7--3.9 interval"

@janden
Copy link
Collaborator

janden commented Jun 20, 2022

I'm not sure about this. We're making an assumption here that bugs/features interpolate linearly between versions, which isn't necessarily the case.

I suggest the following matrix:

                python-version: ['3.7', '3.8', '3.9', '3.10']
                pytorch-version: ['1.10', '1.11']

This way we're testing all current Pythons and the most recent PyTorches.

@lostanlen
Copy link
Collaborator Author

I'm not sure if Torch is Python 3.10-ready, but i can try.
For the rest, no problem. On it

@lostanlen
Copy link
Collaborator Author

I have removed torchaudio from our worfklow. We never had a use for it anyway (not even in the tests or examples). I'm hoping that this removal will speed up CI a bit and generally make our lives easier.

@lostanlen
Copy link
Collaborator Author

@MuawizChaudhary changes approved?! but Pip CI does not pass

@MuawizChaudhary
Copy link
Collaborator

my approvals are an implied "approval upon successful completion of tests" :)

@lostanlen
Copy link
Collaborator Author

@MuawizChaudhary but i don't know how i can get the tests to pass

 Installing collected packages: iniconfig, zipp, typing-extensions, tomli, pyparsing, py, coverage, attrs, packaging, importlib-metadata, pluggy, pytest, pytest-cov
Successfully installed attrs-21.4.0 coverage-6.4.1 importlib-metadata-4.11.4 iniconfig-1.1.1 packaging-21.3 pluggy-1.0.0 py-1.11.0 pyparsing-3.0.9 pytest-7.1.2 pytest-cov-3.0.0 tomli-2.0.1 typing-extensions-4.2.0 zipp-3.8.0
Collecting https://download.pytorch.org/whl/torch_stable.html
  Downloading https://download.pytorch.org/whl/torch_stable.html (322 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 322.0/322.0 kB 20.9 MB/s eta 0:00:00
  ERROR: Cannot unpack file /tmp/pip-unpack-_h707x8x/torch_stable.html (downloaded from /tmp/pip-req-build-4a_udco5, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-4a_udco5
Error: Process completed with exit code 1.

So clearly this is not ready for merge

.github/workflows/pip.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@janden janden mentioned this pull request Jun 20, 2022
@lostanlen
Copy link
Collaborator Author

thanks @janden

it seems like only Torch 1.11 is compatible with Python 3.10 ?

ERROR: Could not find a version that satisfies the requirement torch==1.10.1+cpu (from versions: 1.11.0, 1.11.0+cpu, 1.11.0+cu102, 1.11.0+cu113, 1.11.0+cu115, 1.11.0+rocm4.3.1, 1.11.0+rocm4.5.2)
ERROR: No matching distribution found for torch==1.10.1+cpu
Error: Process completed with exit code 1.

@janden
Copy link
Collaborator

janden commented Jun 21, 2022

thanks @janden

it seems like only Torch 1.11 is compatible with Python 3.10 ?

ERROR: Could not find a version that satisfies the requirement torch==1.10.1+cpu (from versions: 1.11.0, 1.11.0+cpu, 1.11.0+cu102, 1.11.0+cu113, 1.11.0+cu115, 1.11.0+rocm4.3.1, 1.11.0+rocm4.5.2)
ERROR: No matching distribution found for torch==1.10.1+cpu
Error: Process completed with exit code 1.

Makes sense. Probably should just do an include then for that pair so we'd have

                python-version: ['3.7', '3.8', '3.9']
                pytorch-version: ['1.10', '1.11']
                include:
                    - python-version: '3.10'
                      pytorch-version: '1.11'

@lostanlen lostanlen requested a review from janden June 21, 2022 09:25
@lostanlen
Copy link
Collaborator Author

alright, it's finally working. sorry that it took me two days to figure this out. i'm not great at CI
since @MuawizChaudhary has already approved it ... 😆
... @janden merge at your convenience

then we can return to work on the JAX backend

Copy link
Collaborator

@janden janden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nitpick (but might as well while we're here): looks like the latest Torch 1.10 is 1.10.2, which does seem to have py310 compatibility. Could you try this quickly? We should also remove the install cases for Torch 1.7 and 1.9 unless we want to include these.

@lostanlen
Copy link
Collaborator Author

I'm surprised i wasn't offered Torch 1.10.2 in this list then?

ERROR: Could not find a version that satisfies the requirement torch==1.10.1+cpu (from versions: 1.11.0, 1.11.0+cpu, 1.11.0+cu102, 1.11.0+cu113, 1.11.0+cu115, 1.11.0+rocm4.3.1, 1.11.0+rocm4.5.2)

Trying with this now:

  if [ ${{ matrix.pytorch-version }} == '1.10' ]; then
                      pip install torch==1.10.2+cpu \
                                  torchvision==0.11.2+cpu \
                                  -f https://download.pytorch.org/whl/torch_stable.html

(note the 1.10.2)

and removing 1.7 and 1.9

@janden
Copy link
Collaborator

janden commented Jun 21, 2022

Judging from the errors, looks like a conflicting dependency for torchvision. Maybe we just let that one loose (i.e., not pinned) and see if it picks a good one.

@janden
Copy link
Collaborator

janden commented Jun 21, 2022

Hmm so according to https://download.pytorch.org/whl/torch_stable.html, torchvision==0.11.3 is available on py310, but not torchvision==0.11.3+cpu. Looks like the oldest torchvision that runs on py310 and CPU is torchvision==0.12.0+cpu.

@janden
Copy link
Collaborator

janden commented Jun 21, 2022

Looks like the issue is the same for torch==1.10.2 (CPU version is not available on py310, only GPU). So let's forget about this. Go back to what you had before.

@janden
Copy link
Collaborator

janden commented Jun 21, 2022

Sorry for all the noise!

From @janden

Hmm so according to https://download.pytorch.org/whl/torch_stable.html, torchvision==0.11.3 is available on py310, but not torchvision==0.11.3+cpu. Looks like the oldest torchvision that runs on py310 and CPU is torchvision==0.12.0+cpu.

Looks like the issue is the same for torch==1.10.2 (CPU version is not available on py310, only GPU). So let's forget about this. Go back to what you had before.
@lostanlen
Copy link
Collaborator Author

@janden on y va ?

@janden
Copy link
Collaborator

janden commented Jun 21, 2022

allons-y!

@janden janden merged commit 511f1c3 into kymatio:dev Jun 21, 2022
eickenberg pushed a commit that referenced this pull request Jul 5, 2022
* update github workflows

python-version = [3.6, 3.10]
pytorch-version = [1.7, 1.9, 1.11]

* python-version: ['3.6', '3.10']

* Invalid requirement: 'torchaudio-0.11.0+cpu'

* lower to py39

* bump to py37

* update supported versions on README

* update python and torch matrix in GH workflow

* elif [ ${{ matrix.pytorch-version }} == '1.10' ]

* remove torchaudio dependency from worfklows

* bugfix

* bugfix pip.yml, update README

* include py310 torch111 in pip.yml`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants