Allow LaMBO2 to optionally accept a config object at initialization#76
Merged
miguelgondu merged 5 commits intoMachineLearningLifeScience:mainfrom Mar 3, 2025
Merged
Conversation
added 5 commits
February 27, 2025 17:05
…logger Previously LaMBO2 only accepted a path to a config file at initialization and ran hydra initialization to compile this config. To allow for users to run hydra initialization themselves (and potentially include other config parameters besides those related to LaMBO2, such as black box parameters), this updates the initialization to also optionally accept a compiled config. This also adds an optional logger to track metrics and adds the fft expansion factor as a config param, which used to be hard-coded to 2.
Collaborator
|
Hi Frances, thanks for the contribution! Looks good to me, and the CI is passing, so I'll merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main change
Updates LaMBO2 class to optionally accept a config object at initialization.
Rationale
Currently, LaMBO2 only accepts a path to a config file, and calls
hydra.initialize_config_dirduring initialization. Sincehydra.initialize_config_dircan only be run once, this prevents the user from using hydra configs to specify other parameters outside of the LaMBO2 settings. For example, the user might want to use hydra to set hyper-parameters for different Ehrlich black boxes as well as the LaMBO2 model. This change allows the user to initialize a hydra config elsewhere, and then pass the relevant config object to LaMBO2.Other minor changes
fft_expansion_factorhyperparameter to the candidate point selection in LaMBO2 (currently a fixed value of 2), and added a corresponding parameter to the hydra config.lightning.pytorch.loggers.WandbLogger)x_0