f-dangel / backpack

BackPACK - a backpropagation package built on top of PyTorch which efficiently computes quantities other than the gradient.

Home Page:https://backpack.pt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

torch version < 2.x in `setup.cfg`

elcorto opened this issue · comments

Hi

Thanks for the nice library. I'm using it via laplace.

I wonder why setup.cfg says

install_requires =
    torch >= 1.9.0, < 2.0.0

while #307 gives the impression that torch 2.x is supported.

This makes the install a bit bumpy and maybe others have encountered this as well. One usually has a pre-installed torch (say on an HPC system) that e.g. pip picks up rather than pulling a pypi version of the latter. When torch >= 1.9.0, < 2.0.0 and we expose an existing torch 2.x, the install will still pull an older torch 1.x from pypi. The solution so far is to install all dependencies manually and then pip install --no-deps this package.

Thanks a lot.

Hi,

thanks for bringing this up. This should be resolved with #309. I will prepare a new release that supports torch2.x. An immediate fix would be to install from this repository's development branch, which already contains the requirement update.

Best,
Felix

OK, thanks for the quick answer. I was a bit puzzled since the commit (7264532) of #307 is in master (ffa6068) and I was using that. master however also includes the later bfb1fde which introduces the line in question.