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

TypeError: 'ParameterGrid' object does not support item assignment #22

Closed lshpaner closed 3 months ago

lshpaner commented 3 months ago

The following TypeError happens when you avoid using randomized_grid and n_iter

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-26-1dd9ae98f53b> in <cell line: 2>()
      1 # Perform grid search parameter tuning
----> 2 model_tuner.grid_search_param_tuning(X, y)

/usr/local/lib/python3.10/dist-packages/model_tuner/model_tuner_utils.py in grid_search_param_tuning(self, X, y, f1_beta_tune, betas)
    820 
    821                         # Update the parameters in the grid
--> 822                         self.grid[index] = params
    823 
    824                     else:

TypeError: 'ParameterGrid' object does not support item assignment