Open khsjursen opened 3 months ago
Currently, this is implemented in the CustomXGBoostRegressor class directly. In addition, to loading a pre-existing model/gridsearch. Eventually, when more models are added this feature should be part of a wrapper class (or something similar).
When saving a grid search object with the custom XGBRegressor class and objective function, the following does not work:
joblib.dump(gs_obj, dir + '/' + 'custom_loss_cv_grid.pkl')
The custom objective function cannot be pickled since it is defined within a closure. Using dill instead of pickle solves the problem:
Install with:
pip install dill