-
Notifications
You must be signed in to change notification settings - Fork 1.5k
universal-lock: use resolution of a fork as input preferences to its child forks #4617
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
Comments
Makes sense. |
As an example, i'm looking at transformers (https://github.com/konstin/transformers, 133e706e57e57776e4338eeab3c52c4400b3d947, pyproject.toml: https://gist.github.com/konstin/9a12dd0f8280e30746d22f3cc7949331). We have two forks (on opencv-python over numpy), but their resolution is the same since opencv-python has different minimal lower versions of numpy, but we're picking a more recent version anyway. Timinig wise, we spend:
Now transformers is an even more special case: We could infer that the solution we have fulfills all branches of opencv-python equally, so we can short-cut exit (the solution is compatible with the sibling too). So:
|
Is it possible that once we do the first thing (preferences), the timing required to solve the second split goes to ~zero? Since it's all in-memory? |
Possibly! We'll have to implement it and benchmark, i agree we should start with preferences |
Nice work!
main:
branch:
|
Sweet, thanks |
@konstin brought this up as both a potential performance optimization and a more solid guarantee that resolutions between forks settle on consistent versions.
At present, the forks in the universal resolver are completely independent. When a fork happens, one of them is run to completion and then the other is solved only after the first is finished. When all forks have finished, the resolutions output from each are merged into one.
But we could make it so that once a fork finishes, its resolution is used as an input to all forks it created. This should help with ensuring we pick the same version of packages across forks whenever possible.
I don't have a good sense of how common an issue this is in practice. I also don't have a test case yet.
The text was updated successfully, but these errors were encountered: