-
Notifications
You must be signed in to change notification settings - Fork 1
[ABI Dependency] Best-Effort support for pip
#123
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
base: main
Are you sure you want to change the base?
Conversation
168a2a0 to
5b994c1
Compare
| yield f"{vspec.major}" | ||
| yield f"{vspec.major}.{vspec.minor}" | ||
| yield f"{vspec.major}.{vspec.minor}.{vspec.micro}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixed feelings about this. We can't handle versions with more than 3 components here.
My main worry is upstream doing something like succession of 2.8, 2.8.1, 2.8.2... — but I guess we are hacking it into 2.8.0 then, so that would kinda work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have a better idea let me know but IMHO it's reasonable and easy to read.
| VariantProperty( | ||
| namespace=VARIANT_ABI_DEPENDENCY_NAMESPACE, | ||
| feature=_normalize_package_name(pkg_name), | ||
| value=_ver, | ||
| ) | ||
| for _ver in _generate_version_matches(pkg_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (quite complex) bit is repeated twice — move it to a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's worth it - it's easy to read - moving the whole thing to a function would make it slightly less easy to read.
You tell me - honestly I don't mind enough to argue
2fffbf5 to
657e80d
Compare
657e80d to
9a4f968
Compare
Co-authored-by: Michał Górny <[email protected]>
Functional and "best effort" implementation for
pip.Should work just fine.
Implementation details
plugin venv isolation.export VARIANT_ABI_DEPENDENCY=packageA==1.2.3,...,packageZ==7.8.9Should support these usecases
pip install torch # `torch` is pre-installed and automatically fed by `variantlib` pip install vllm flash-attnVersioning
The interface supports "sort of range support" and not exclusively
major.minor.micropinningexport VARIANT_ABI_DEPENDENCY="torch==2.8.0"=> only2.8.0torch releaseexport VARIANT_ABI_DEPENDENCY="torch==2.8"=> only>=2.8,<2.9torch releasesexport VARIANT_ABI_DEPENDENCY="torch==2"=> only>=2,<3torch releasesWhich allows developers for different package to express different level of compatibility.
It should be noted that the package maintainers can also combine
abi_dependencytags to express anORmatch:abi_depedency :: torch :: 2.8.0=> exact2.8.0matchabi_depedency :: torch :: 2.9.0=> exact2.9.0matchabi_depedency :: torch :: 3=>>=3,<4match=> Any version of
torchthat matches one of the above will be compatible.