PyTorch is a dependency of Ignite and, thus, is specified in setup.py
https://github.com/pytorch/ignite/blob/4b311cc82fe45b3082661125cd7ee54007283fb0/setup.py#L24-L26
and conda.recipe/meta.yaml:
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.
@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
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
and Dockerfile maybe
Most helpful comment
@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,<2as compatible release constrain.cc @ykumards @sdesrozis