microsoft / microsoft/FLAML

How to save StackingRegressor model while we using ensemble method

Open
#1,181 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Jupyter Notebook
Stars
4.4k
Forks
565
Avg merge
5d 8m
Merged PRs (30d)
17

Description

Hi,
We used ensemble to perform regression task, and found after fitting, the StackingRegressor model was not able to be saved by using pickle or other ways.
So could you give me some suggestions on how to saving models when using AutoML ensemble?

The code of FLAML AutoML models:
am = automl()
am.fit(x_train,
y_train,
task='regression',
metric='rmse',
split_ratio=0.2,
ensemble={
'final_estimator': LGBMRegressor(),
'passthrough': True,
},
time_budget=3600)
with open('am_model_test.pickle', 'wb') as am_output:
pickle.dump(am, am_output, pickle.HIGHEST_PROTOCOL)
am_output.close()
截屏2023-08-13 17 11 17
截屏2023-08-13 17 11 26

```[tasklist]
### Tasks
- [ ] Question
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.