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

Refactoring and renaming of BoTorchSearcher and BoTorch #507

Merged
merged 1 commit into from Jan 23, 2023

Conversation

mseeger
Copy link
Collaborator

@mseeger mseeger commented Jan 21, 2023

Issue #, if available:

Description of changes:
Simplification and renaming of BoTorchSearcher. This PR will be followed by an extension of the developer tutorial, which uses this searcher as example how to wrap external code. The wrapper should therefore be up-2-date with respect to support from base classes.

Also, one deprecated BoTorch function is replaced.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mseeger mseeger requested a review from wesk January 21, 2023 20:45
from botorch.models import SingleTaskGP
from botorch.fit import fit_gpytorch_model
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This function is deprecated

@@ -450,3 +451,84 @@ def _restore_from_state(self, state: dict):

def set_random_state(self, random_state: np.random.RandomState):
self.random_state = random_state


class SearcherWithRandomSeedAndFilterDuplicates(SearcherWithRandomSeed):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is code to be introduced in #487, which will be merged before this one here.

@@ -16,9 +16,11 @@

try:
from syne_tune.optimizer.schedulers.searchers.botorch.botorch_searcher import ( # noqa: F401
BotorchSearcher,
BoTorchSearcher,
BotorchSearcher, # deprecated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can BotorchSearcher be removed entirely in favor of BoTorchSearcher?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see -- looks like you are keeping it for backwards compatibility

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we can remove it after a while

wesk
wesk previously approved these changes Jan 23, 2023
@mseeger mseeger merged commit 7be30b4 into main Jan 23, 2023
@mseeger mseeger deleted the refactor_botorch branch January 23, 2023 13:16
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.

None yet

2 participants