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

[Bug] pip install installs torch stable if torch nightlies are present #662

Closed
Balandat opened this issue Apr 23, 2019 · 3 comments
Closed
Labels

Comments

@Balandat
Copy link
Collaborator

Installing nightlies first and then installing gpytorch reverts torch to latest stable:

pip install -q torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install -q git+https://github.com/cornellius-gp/gpytorch.git
torch.__version__  # 1.0.1.post2

Installing gpytorch first and then installing nightlies works properly:

pip install -q git+https://github.com/cornellius-gp/gpytorch.git
pip install -q torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
torch.__version__  # 1.1.0.dev20190423

Taking a step back, we do all this version parsing magic in setup.py here.
Not really sure why this is necessary, can't we just require this to be "torch>=1.0.1"? Or is there some issue with the package naming?

@jacobrgardner
Copy link
Member

Before #663 was merged the reason we did version parsing was to solve exactly this issue, where we want to allow people to update gpytorch without overwriting their torch install if they have torch-nightly installed.

Do you have a solution in mind or should we revert #663? I'd rather do the version parsing than have pip install gpytorch do silly things for people who are on pytorch-nightly.

@Balandat
Copy link
Collaborator Author

Yeah so is scrapped this because the parsing actually didn't work for me. Turns out this is an obscure bug with pip 19.0.1 in conjunction with having a pyproject.toml file: pypa/pip#6163

Not quite sure what the proper solution is for this. Sledgehammer would be removing pyproject.toml. We could also try to check pip version at runtime. Maybe there is also a way to check whether either torch or torch-nightly is installed without actually importing them?

@Balandat
Copy link
Collaborator Author

@jacobrgardner I put up #666 if you want to merge that in and go back to the way things were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants