Different search space for flaml.tune vs for built-in models?
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 565
- Avg merge
- 5d 8m
- Merged PRs (30d)
- 17
Description
I am trying to add a new time series model to the list of FLAML's built-in ones, but have trouble specifying the search space. This model contains two component models from FLAML's builtins, and I want to search over the available component models and their respective search spaces, so the [code](https://github.com/markharley/FLAML/blob/2dba8d4a0ad1a2c9368f15411a576a29d9115f02/flaml/time_series/multiscale.py#L187) is
```
def _search_space(
self, data: TimeSeriesDataset, task: Task, pred_horizon: int, **params
):
estimators = {
"model_lo": ["arima", "sarimax"],
"model_hi": ["arima", "sarimax"],
}
out = {}
for mdl, ests in estimators.items():
est_cfgs = []
for est in ests:
est_class = task.estimator_class_from_str(est)
est_cfgs.append(
{
"estimator": est,
**(est_class.search_space(data, task, pred_horizon)),
}
)
out[mdl] = tune.choice(est_cfgs)
return out
```
However when I try to use that, I get the following error:
```
for name, space in search_space.items():
> assert (
"domain" in space
), f"{name}'s domain is missing in the search space spec {space}"
E AssertionError: model_lo's domain is missing in the search space spec
```
In auto-causality, the above way of defining the nested search space works fine - am I doing something wrong or is the search space definition spec different for FLAML's built-in models, and if so, why?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.