-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up interface to for specifying seeds to optuna samplers with PEC. #2876
base: devel
Are you sure you want to change the base?
Conversation
Figured out a better way to reseed and already instatiated Optuna sampler. I was overwriting the RNG state in a hacky way before. I didn't realize there was a reseed_rng() method on the the base sampler class that can be called when the seed is re-initialized.
Test for CMA-ES sampler was actually just falling back to RandomSampler. I just want to test things work with another sampler so I switched to QMCSampler because it also supports 1D search spaces.
Added support for passing kwargs to un-instantiated optuna sampler.
This PR causes the following changes to the html docs (ubuntu-latest-3.11-x64):
See CI logs for the full diff. |
Should this go straight to master? I think it's better to drop 871f960 ("Update optuna pin to latest.") from this PR. |
@jvesely, whoops that was a mistake about going straight to master. Thanks for catching. I will drop the change of the pin as well. |
One more nit. Will the existing two tests that use instanced samplers issue warnings? If so, should the test check that the warnings are emitted in those two cases? |
Some small modifications to PEC\Optuna RNG seeding interface based on suggestions from @jvesely and @jdcpni.
PECOptimizationFunction
and added an argument calledoptuna_kwargs
for specifying any desired sampler construction args. This allows use the PECinitial_seed
if it is specified.initial_seed
with an already instantiated optuna sampler.Fixes issue #2874