-
Notifications
You must be signed in to change notification settings - Fork 42
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
Pip install is unpredictable and often breaks Colab usage #620
Comments
Sounds like the answer may be some combination of publishing a pre-built wheel and exporting a requirements.txt with poetry... python-poetry/poetry#2778 (comment) all of this moves us in the direction of a 'real' release process, which... fair. |
I spent a good chunk of time experimenting with pip install in Colab, using various permutations of requirements.txt files. Short version is I don't think that simply publishing a requirements file with locked dependencies is a workable solution:
|
Notes on what to try next:
|
I investigated wheels... Same problem; it's a binary of the current repository, with a description of dependencies. We get a METADATA file which includes basically a version of the toml constratints:
Pip (or whatever) then goes looking for versions which satisfy these constraints. I'm moving more heavily towards splitting training code into a separate repository, as that will isolate the damage from Scenic. We might also be able to drop the tensorflow-io dependency, which complicates tensorflow by locking us to a specific version. |
Ok, fun complication:
This pushes us back in the direction of /wanting/ to support loose dependency specification (so we can just use the Colab defaults as much as possible), which in turn means dealing with the problematic dependencies (TF-IO and Scenic). |
Landed this pull request: |
I discovered that pip install doesn't actually make use of the poetry lock file, and essentially makes up the dependency tree on the fly from the pyproject.toml file.... This means that it's pretty easy to get into a weird state when we do the colab pip install: the lock file gives us a specific tested combination of dependency versions, with CI tests, but we don't have any real way to test what's going on with the pip-installed version.
Ideally, we should have pip install the exact set of dependency versions specified in the lock file, to ensure that our CI testing actually tells us that the Colab notebooks are working.
There's some pretty extensive discussion here of the problem:
python-poetry/poetry#2778 (comment)
The text was updated successfully, but these errors were encountered: