-
Hi all! I'm attempting to figure out the right way to expose my library to users, and how I should handle dependencies. Right now, I just specify More generally: how should I handle |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you have a jax-dependent library which is meant to be run on multiple platforms, you inherit these difficulties. If you list You might also think about defining extra installation commands, e.g. |
Beta Was this translation helpful? Give feedback.
jaxlib
is required to run anyjax
code, butjax
does not pinjaxlib
in its requirements because differentjaxlib
libraries are needed for different hardware (cpu, gpu, tpu, etc.) and Python's dependency tracking system does not have the granularity of expression for that. JAX itself addressed that via the installation instructions.If you have a jax-dependent library which is meant to be run on multiple platforms, you inherit these difficulties. If you list
jaxlib
as a hard dependency in yourpyproject.toml
, it may prevent users from installing the correct jaxlib version for their system. So I'd recommend following JAX, and not listingjaxlib
inpyproject.toml
, but rather be clear in your…