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

Bug in Fit method When Score is Set #83

Closed lshpaner closed 2 weeks ago

lshpaner commented 2 weeks ago

Description

When specifying the score parameter (e.g., score="roc_auc") in the fit method of a model, an UnboundLocalError occurs:

This issue arises when the code attempts to reference best_params in params_preprocessing, but best_params has not been assigned.

The model should handle the score parameter without triggering an UnboundLocalError. If best_paramsis required, it should be initialized or assigned before it is accessed in params_preprocessing.

elemets commented 2 weeks ago

This should now be fixed.