I am using optuna for parameter optimisation of my custom models.
Is there any way to sample parameters until current params set was not tested before? I mean, do try sample another params if there were some trial in the past with the same set of parameters.
In some cases it is impossible, for example, when there is categorial distribution and n_trials
is greater than number os possible unique sampled values.
What I want: have some config param like num_attempts
in order to sample parameters up to num_attempts
in for-loop until there is a set that was not tested before, else - to run trial on the last sampled set.
Why I need this: just because it costs too much to run heavy models several times on the same parameters.
What I do now: just make this "for-loop" thing but it's messy.
If there is another smart way to do it - will be very grateful for information.
Thanks!