uclamii / model_tuner

A library to tune the hyperparameters of common ML models. Supports calibration and custom pipelines.
Apache License 2.0
3 stars 0 forks source link

Refactor Version Constraints #43

Closed lshpaner closed 2 weeks ago

lshpaner commented 1 month ago

Refactor Version Constraints in setup.py to Ensure Flexibility and Stability

Currently, the version constraints in the setup.py file use a mix of minimum version specifiers (e.g., >=) for the dependencies. While this provides flexibility in allowing newer versions of libraries, it may also introduce compatibility issues if future versions of dependencies introduce breaking changes.

The setup.py file contains version constraints using the >= specifier, which allows the installation of newer versions without any upper bounds.

Proposed Refactor (Example)

install_requires=[
    "joblib>=1.3.2,<2.0.0",
    "numpy>=1.21.6,<2.0.0",
    "pandas>=1.3.5,<2.0.0",
    "scikit-learn>=1.0.2,<2.0.0",
    "scipy>=1.7.3,<2.0.0",
    "tqdm>=4.66.4,<5.0.0",
],

Currently tested on:

This ensures that the project remains compatible with future releases of these libraries but avoids breaking changes that may come with major version upgrades (i.e., 2.0.0 or later).

Benefits of Refactoring:

This refactor will help prevent unexpected behavior in production and improve the long-term maintainability of the project.

elemets commented 2 weeks ago

We've completed this for the new bayesian addition as well as for different python versions 3.7-3.11