-
Notifications
You must be signed in to change notification settings - Fork 739
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
Bad resolver error for colabfold[alphafold]==1.5.5
on python 3.11
#5046
Comments
As of f2d6718 the error is
|
Uses my expanding tree reduction knowledge from #6092 to improve the long-standing issue of verbose messages for unavailable packages. Implements pubgrub-rs/pubgrub#232, but post-resolution instead of during resolution. Partially addresses #5046 Closes #2519
…ers or extras (#6162) There were different `PubGrubPackage` types so they never matched the available versions set! Luckily, the available versions are agnostic to the markers and optional dependencies so we can just broaden to using `PackageName` as a lookup key. Addresses yet another complaint in #5046
error message aside: is it right that there is no solution? https://github.com/sokrypton/ColabFold/blob/v1.5.5/poetry.lock says there is. |
Not sure. Worth understanding, I'll take a look. The part of the error that I don't see in the dependency graph is: |
Jax does have |
It would be fixed by #6150, which we should probably do. |
I actually think the right fix is... have the user specify a range of Python versions to resolve for, separate from |
So, I'd say it should actually be solved by #4087. |
Ah, the |
Not quite -- it's not that it's ignored. It's that we solve for Python 3.11 as a minimum supported version. |
It's like: |
That'd do it. Then there's definitely no solution, right from the start: https://github.com/sokrypton/ColabFold/blob/675f93a44eee6589a003164b047e7d4183073d1e/pyproject.toml#L22 |
…6160) In #5046, we show the tautological proof: ``` ╰─▶ Because colabfold[alphafold]==1.5.5 depends on jax>=0.4.20 and only the following versions of jax are available: jax<=0.4.20 jax==0.4.21 jax==0.4.22 jax==0.4.23 jax==0.4.24 jax==0.4.25 jax==0.4.26 jax==0.4.27 jax==0.4.28 jax==0.4.29 jax==0.4.30 jax==0.4.31 we can conclude that colabfold[alphafold]==1.5.5 depends on jax>=0.4.20. And because jax>=0.4.20 depends on numpy>=1.26.0, we can conclude that colabfold[alphafold]==1.5.5 depends on numpy>=1.26.0. (1) ``` This is a part of the error tree because the statement `colabfold[alphafold]==1.5.5 depends on jax>=0.4.20` is actually a simplification of `colabfold[alphafold]==1.5.5 depends on jax>=0.4.20,<0.5.0` and the no versions clause is a proof of that simplification. Without simplification, the clause looks like: ``` ╰─▶ Because colabfold[alphafold]==1.5.5 depends on jax>=0.4.20,<0.5.0 and only the following versions of jax are available: jax<=0.4.20 jax==0.4.21 jax==0.4.22 jax==0.4.23 jax==0.4.24 jax==0.4.25 jax==0.4.26 jax==0.4.27 jax==0.4.28 jax==0.4.29 jax==0.4.30 jax==0.4.31 we can conclude that colabfold[alphafold]==1.5.5 depends on one of: jax==0.4.20 jax==0.4.21 jax==0.4.22 jax==0.4.23 jax==0.4.24 jax==0.4.25 jax==0.4.26 jax==0.4.27 jax==0.4.28 jax==0.4.29 jax==0.4.30 jax==0.4.31 And because jax>=0.4.20 depends on numpy>=1.26.0, we can conclude that colabfold[alphafold]==1.5.5 depends on numpy>=1.26.0. ``` I don't think we have a great way to avoid performing the simplification of the range conditionally and it makes the error simpler to just jump straight to `colabfold[alphafold]==1.5.5 depends on jax>=0.4.20`. The derivation for this clause looks like: ``` jax==0.4.20 | ==0.4.21 | ==0.4.22 | ==0.4.23 | ==0.4.24 | ==0.4.25 | ==0.4.26 | ==0.4.27 | ==0.4.28 | ==0.4.29 | ==0.4.30 | ==0.4.31 depends on numpy>=1.26.0 no versions of jax>0.4.20, <0.4.21 | >0.4.21, <0.4.22 | >0.4.22, <0.4.23 | >0.4.23, <0.4.24 | >0.4.24, <0.4.25 | >0.4.25, <0.4.26 | >0.4.26, <0.4.27 | >0.4.27, <0.4.28 | >0.4.28, <0.4.29 | >0.4.29, <0.4.30 | >0.4.30, <0.4.31 | >0.4.31, <0.5.0 colabfold[alphafold]==1.5.5 depends on jax>=0.4.20, <0.5.0 ``` So it looks like we can take trees of this form and drop the "no versions" clause _if_ the ranges are compatible[*]. See [this comment](#6160 (comment)) for a simpler explanation. With this pull request, the clause simplifies to ``` ╰─▶ Because colabfold[alphafold]==1.5.5 depends on jax>=0.4.20 and jax>=0.4.20 depends on numpy>=1.26.0, we can conclude that colabfold[alphafold]==1.5.5 depends on numpy>=1.26.0. (1) ``` Unfortunately, this doesn't change any snapshots in our test suite so I'm uncertain if the strategy generalizes. In some incorrect iterations of this logic, the snapshots did reveal my mistakes. [*] "if the ranges are compatible" includes a bit of hand-waving. I'm not 100% sure if I've chosen the correct range heuristic here.
The error with current main is:
This does not look bad anymore. We could collapse |
if uv is trying to solve for python >= "3.12", it would have been even simpler to notice directly that colabfold 1.5.5 requires python ">=3.9,<3.12" |
We're ignoring upper bounds on |
interesting choice! (I see I was in that issue already but either missed or forgot this outcome) well I guess this issue is an example of that decision having downside Even with the relatively improved error message: if the fact is that this project does not install on python 3.12 and had declared that it didn't install on python 3.12 - I guess users would rather have seen that message than this one. (of course there is upside too, no doubt some projects will succeed in installing even though they declared that they would fail) |
The resolver error for
echo "colabfold[alphafold]==1.5.5" | cargo run pip compile -p 3.11 --universal -
is verbose and has multiple problems. I'm filing this as one ticket rather than multiple since i expect that some of this is #5045 and others may be the same underlying problem. We should split it into multiple after tracking down the cause of the different problems.Full resolver error
jax>=0.4.20 depends on numpy{python_version >= '3.12'}>=1.26.0
, we know thatjax>=0.4.20 depends on numpy{python_version >= '3.12'}>=1.26.0.
. We can skip this entire section with the jax listing and only tell the user about the jax -> numpy dependency.clear why, and if we need this information, we shouldn't repeat it for each package.
numpy{python_version >= '3.12'}>=1.26.0
to a list of incompatibilities and a conclusion aboutnumpy{python_version >= '3.12'}!=1.26.4
for a reason not explained.The text was updated successfully, but these errors were encountered: