Skip to content
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

Add support for Pythonic search space to SimpleSampler #84

Conversation

toshihikoyanase
Copy link
Member

Contributor Agreements

Please read the contributor agreements and if you agree, please click the checkbox below.

  • I agree to the contributor agreements.

Motivation

Currently, SimpleSampler does not provide Pythonic search space support (a.k.a., define-by-run), but it is one of Optuna's key features (See https://optuna.org).
This PR tries to add support for Pythonic search space while keeping the simplicity of the current SimpleSampler.
Additionally, it renames SimpleSampler to SimpleBaseSampler to clarify that it is an abstract class.

Description of the changes

  • Accept search_space=None in SimpleSampler.__init__. In this case, search space is estimated like Optuna's built-in samplers
  • Add a default implementation of infer search space with IntersectionSearchSpace
  • Add a default implementation of independent sampling with RandomSampler
  • Update existing user-defined samplers

Copy link
Member

@y0z y0z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed.

@y0z y0z merged commit accd584 into optuna:main Jun 28, 2024
4 checks passed
@toshihikoyanase toshihikoyanase deleted the add-support-for-pythonic-search-space-to-simple-sampler branch June 28, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants