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
required dependencies -> optional dependencies? #466
Comments
I bet many of those are driven by the use of 'scikit-image'. That package is only used for color space conversions, but those conversions are needed for all the plotting methods. We could pull out that dep by getting Lch color space methods another way |
This currently make deployment of the library in production somewhat inconvenient. Would be nice to have the lean version that doesn't pull in plotting available. |
I can see why that would be nice. If anyone has ideas for an elegant way to do that without splitting up the repo and making maintenance harder please speak up. |
One way is to use extras, that are supported by pip: |
I will take a look at this one. |
Okay, I finally got around to tackling this and have been able to remove skimage, matplotlib and ipython as required dependencies. The need for ipython is only in a notebook, and then people already have it, and matplotlib is so common that it seems reasonable to just have a warning if people try to use a plot without it installed |
I am not sure why should I need to install
pillow
orscikit-image
networkx
if I am not working with image data nor networks.I understand that this rep contains everything, all methods and plotting. But it seems unreasonble to ask for all these dependencies if the user just wants shap for a specific problem.
For example, for me, the use-case is to compute the shap values for feature importance and instance interpretability on a restful API supporting a frontend containing vizualization (that does not depend on shap visualizations). The backend does not need any of the vizualisation, nor pandas, only numpy, tensorflow and spark. I do not want to expose data to third-party libraries that I do not trust (e.g.
appnope
) to a production system.One way to approach this is to split the
install_requires
in multipleextra_requires
, and make only the mandatory packages part of theinstall_requires
, as per the official recommendation to useinstall_requires
:The text was updated successfully, but these errors were encountered: