Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

ensure torch always up-to-date in CI #5286

Merged
merged 4 commits into from
Jun 30, 2021
Merged

ensure torch always up-to-date in CI #5286

merged 4 commits into from
Jun 30, 2021

Conversation

epwalsh
Copy link
Member

@epwalsh epwalsh commented Jun 25, 2021

This adds a step in CI that will ensure the current installed version of PyTorch is the most recent allowed version PyTorch according to our dependency specification in setup.py.

This is needed because we have to hard-code the torch installation steps in some places, so dependabot updates don't necessarily change the version of PyTorch used in CI.

@epwalsh epwalsh requested a review from dirkgr June 25, 2021 17:42
Copy link
Member

@dirkgr dirkgr left a comment

Choose a reason for hiding this comment

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

Is there no pip incantation that can do this? It seems brittle to parse the torch version string like that.

@epwalsh
Copy link
Member Author

epwalsh commented Jun 25, 2021

Is there no pip incantation that can do this? It seems brittle to parse the torch version string like that.

Another option would be to parse the output of pip show torch or pip freeze | grep torch. But that seems even more brittle.

@dirkgr
Copy link
Member

dirkgr commented Jun 25, 2021

What I mean is, isn't there a pip incantation that can install the highest allowed version of torch? Does pip install torch --upgrade do it?

@epwalsh
Copy link
Member Author

epwalsh commented Jun 25, 2021

That works with any other dependency but not with torch since the exact version we need depends on the CUDA version available, and pip is not aware of that.

Copy link
Member

@dirkgr dirkgr left a comment

Choose a reason for hiding this comment

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

Well, I'm not excited about the brittleness, but I don't have a better idea either.

@dirkgr dirkgr enabled auto-merge (squash) June 30, 2021 23:43
@dirkgr dirkgr merged commit 7428155 into main Jun 30, 2021
@dirkgr dirkgr deleted the torch-version-check branch June 30, 2021 23:57
@dirkgr
Copy link
Member

dirkgr commented Dec 15, 2021

Well what do you know, it broke.

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

Successfully merging this pull request may close these issues.

2 participants