You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, Developers,
Is it possible to add suggest_discrete_int method to trial?
Motivation
We want to make a grid somehow so that parameter search becomes more efficient and less time-consuming.
Description
Optuna already has a discrete_uniform method on optuna.Trial. It's quite useful, but some of the models require integer values as their arguments. For instance, XGBoost. Since n_estimator and max_depth must be an integer, it raises an error when I pass float values to these.
Therefore, trial.suggest_int or trial.suggest_categorical are used so that I input the values I want. If optuna has a feature of throwing discrete integer, this operation could vanish.
Alternatives (optional)
From my perspectives, there are two options,
To cast discrete_uniform output as an integer
To use suggest_categorical like suggest_categorical('hoge', np.arange(0, 10, 2))
Additional context (optional)
The text was updated successfully, but these errors were encountered:
Thank you for your request!
We have already received similar requests like #510 and are discussing the design of new APIs there. (The last comment was about four month ago, though.) I think the (b) API of this comment is corresponding to your request.
Hello, Developers,
Is it possible to add
suggest_discrete_int
method to trial?Motivation
We want to make a grid somehow so that parameter search becomes more efficient and less time-consuming.
Description
Optuna already has a discrete_uniform method on optuna.Trial. It's quite useful, but some of the models require integer values as their arguments. For instance, XGBoost. Since n_estimator and max_depth must be an integer, it raises an error when I pass float values to these.
Therefore,
trial.suggest_int
ortrial.suggest_categorical
are used so that I input the values I want. If optuna has a feature of throwing discrete integer, this operation could vanish.Alternatives (optional)
From my perspectives, there are two options,
suggest_categorical('hoge', np.arange(0, 10, 2))
Additional context (optional)
The text was updated successfully, but these errors were encountered: