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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyTorch dependency is lacking version constraint #897

Closed
sisp opened this issue Apr 7, 2020 · 3 comments 路 Fixed by #1016
Closed

PyTorch dependency is lacking version constraint #897

sisp opened this issue Apr 7, 2020 · 3 comments 路 Fixed by #1016

Comments

@sisp
Copy link
Contributor

sisp commented Apr 7, 2020

馃悰 Bug description

PyTorch is a dependency of Ignite and, thus, is specified in setup.py

ignite/setup.py

Lines 24 to 26 in 4b311cc

requirements = [
"torch",
]

and conda.recipe/meta.yaml:

requirements:
build:
- python
- setuptools
- pytorch
run:
- python
- pytorch

The PyTorch dependency is lacking a version constraint which may work fine right now, but there is no guarantee that Ignite will be compatible with any future major PyTorch release (e.g. PyTorch v2.x).

I suggest to constrain the PyTorch version that Ignite is compatible with, e.g. >=1.0,<2 or <2 if any 0.x and 1.x version works. If PyTorch has a new major release, even previous Ignite versions can become compatible with the new major PyTorch release (especially if no changes to the code are necessary) by making new bug fix releases with relaxed version constraints to include the new PyTorch version.

In my opinion, it is highly preferable to be conservative about dependency version constraints through a compatible release constraint in case the dependency conforms with semantic versioning. It is impossible to guarantee compatibility with a future major release of a dependency as its API can change arbitrarily.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 7, 2020

@sisp this makes sense, thanks for the suggestion !
Currently, we maintain and test the compatibility with the latest stable and nightly version of PyTorch.
Yes, I think we can add >=1.0,<2 as compatible release constrain.

cc @ykumards @sdesrozis

@sdesrozis
Copy link
Contributor

We should provide tools to configure virtual envs with good like this conda.yaml

name: ignite_env
channels:
  - pytorch
dependencies:
  - pip
  - pytorch>=1.4
  - torchvision>=0.5
  - tensorboard>=2.1
  - pandas>=1.0
  - pyyaml>=5.3
  - pip:
    - git+https://github.com/pytorch/ignite

usable like conda env create -f conda.yml

@sdesrozis
Copy link
Contributor

and Dockerfile maybe

0.4.0 automation moved this from To do to Done May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.4.0
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants