-
Notifications
You must be signed in to change notification settings - Fork 164
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
Make pyo3
an optional dependency in mistralrs-core
#303
Conversation
@@ -17,7 +17,7 @@ doc = false | |||
|
|||
[dependencies] | |||
pyo3.workspace = true | |||
mistralrs-core = { version = "0.1.7", path = "../mistralrs-core" } | |||
mistralrs-core = { version = "0.1.7", path = "../mistralrs-core", features = ["pyo3_macros"] } |
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.
Can you please also update mistralrs-pyo3/Cargo_template.toml
?
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.
Yeah forgot to add it there, is the Cargo_template.toml
only used to select features for the pypi
uploads?
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.
Yeah, it's used for creating packages with different features. I don't love that way of doing it, though, because we have so many packages uploaded. Do you know of another way to do this? Ideally, we could gate features on install, but maturin is missing functionality to do that.
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.
Well it seams to be possible to set feature flags via the MATURIN_PEP517_ARGS
environment, as mentioned here. But that is very unintuitive.
Maybe we should create a ticket to enable features via pips optional dependency flags e.g. mistralrs[cuda] to use the cuda
feature.
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.
For now i just added pyo3_macros
as a forced feature. Should be good to go 👍
Thank you! |
Puts
pyo3
behind thepyo3_macros
feature flag, which is set per default in themistralrs-pyo3
create.This allows us to compile the benchmark/server without any python depencies via: