Skip to content

Customize some parameters for Study object (Optuna backend) #1231

@wasf84

Description

@wasf84

Description

Hi.

It would be nice if it were possible to customize the Study object (Optuna backend) for all Auto models.

Sometimes the optimization process breaks with a 'RuntimeError' (or any other error). This happens because occasionally, depending on the parameters sampled for the model, a DataFrame full of null values is generated, and applying the validation metric causes an error. It would be possible to prevent the optimization process from stopping if the Study could be customized using the 'study.optimize(..., catch=(RuntimeError,))' attribute. The optimization process would simply ignore this error and proceed to the next one.

This could be achievied if we could pass some "study_kwargs" in the Auto* models creation, I think.

For example:

AutoDeepAR(
h=24,
config=config_deepar,
search_alg=optuna.samplers.TPESampler(seed=1989),
backend='optuna',
num_samples=5,
study_kwargs={'catch' : '(RuntimeError,)'}
)

I hope I made myself clear.

Thanks for your attention.

Use case

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions