-
Notifications
You must be signed in to change notification settings - Fork 61
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
Reducing install_requires
to minimum (& expand extras_require
) and looser version ranges
#56
Comments
Thanks for your suggestion. As of now, |
Here is a better reference to suggest a https://stackoverflow.com/questions/6237946/optional-dependencies-in-distutils-pip I looked through the code and yes it is currently the case that the implementation requires This will also have the benefit that whenever you add nicer/better/more visualizations, users can just update the package and call the new functions on an existing object (loaded from disk for example), and don't have to re-initialize a new class, train / tune it again, just so they can use a new plotting funcationality. Basically proposal would be sthg along the lines of
This would accomplish the outcome that the core functionality in xgboostlss -- which AFAIU is training & predicting -- only depends on absolute minimum requirements; but any addon helper functions (like tuning or plotting) you provide are optional for installation/use. For handling the case when dependencies are not available you can then do sthg like here to let users know they need to install |
I would agree with you, @gmgeorg. Wider version ranges ensure usability, whereas frequent bumps of lower bounds prevent compatibility with a wider range of systems. Generally, I would strongly advise the same, separating out the tuning from the raw model - like in I would be happy to help with a little refactoring of this package, possibly copying some of the more general visualization and tuning logic to |
repeating this question again |
@fkiraly yeah, if we are all on the same page , I can spend some time on helping refactor. @StatMixedML ? |
Re the refactor, agreed on the big lines here:
I would also recommend to ensure downwards compatibility by not changing the public interfaces to much. |
At quick glance it seems that the current
setup.py
file is fully exhaustive on all dependencies as an absolute requirement including very specific ranges for versions. If at all possible, it would greatly improve compatibility w/ existing Python repos (and more people being able to use it w/o having to resolve conflicts) if theinstall_requires
was only specifiying absolutely required modules (e.g., plotting oroptuna
is not really required to use this great package) and the minimum version date (>=
) needed, instead of the (approximate)~=
range.See also first accepted answer here:
https://stackoverflow.com/questions/6947988/when-to-use-pip-requirements-file-versus-install-requires-in-setup-py
Curious to learn more about whether this package has to be so specific/restrictive on the dependencies (e.g., suggest to use
https://stackoverflow.com/questions/10572603/specifying-optional-dependencies-in-pypi-python-setup-py
The text was updated successfully, but these errors were encountered: