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

Bayesian Opt input structure fix #356

Merged

Conversation

GabrielSoto-INL
Copy link
Collaborator

@GabrielSoto-INL GabrielSoto-INL commented Apr 10, 2024


Pull Request Description

What issue does this change request address?

#350 , #355

What are the significant changes in functionality due to this change request?
  1. Fixes a previous issue in template_driver.py where if the user requests usage of the BayesianOpt optimization algorithm/strategy, it still writes a GradientDescent node into the outer.xml.

  2. There are modifications to the XML input node under the Cases -> optimization_settings -> algorithm node. The <algorithm> node accepts subnodes rather than a string for either <GradientDescent> or <BayesianOpt>. Each now has algorithm-specific settings that can be modified by the user (all available in the HERON user manual). Default is still <BayesianOpt>.

  3. Some features available in the outer.xml for <GradientDescent> are now able to be modified in the heron input script as described in [TASK] Access GradientDescent Features in HERON input script #355.

  4. Updated some of the scripts for checking XMLs; regolding 'optimization_settings' test to change from Gradient Descent to Bayesian Opt results (larger tolerance, shorter duration)


For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
  • 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
  • 4. Automated Tests should pass.
  • 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large tes.
  • 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 7. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.
  • 8. If an analytic test is changed/added, the the analytic documentation must be updated/added.
  • 9. If any test used as a basis for documentation examples have been changed, the associated documentation must be reviewed and assured the text matches the example.

@GabrielSoto-INL GabrielSoto-INL changed the title [WIP] Bayesian Opt input structure fix Bayesian Opt input structure fix Apr 10, 2024
src/Cases.py Outdated
@@ -545,6 +545,13 @@ def _specs_optimizer(cls):
Bayesian Optimizer.""", default='ExpectedImprovement')
bayesian_opt.addSub(acquisitionSub)

#======== Kernel for BO========#
seedSub = InputData.parameterInputFactory('initialSeed', contentType=InputTypes.IntegerType,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm fine with initialSeed; if at some point you want to change this to seed while making other changes, I slightly prefer that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

eh, might as well change it now. it'll be seed for the HERON input, but I think it has to still be initialSeed in the outer.xml unless we modify the RAVEN input structure

Copy link
Collaborator

Choose a reason for hiding this comment

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

sure, that's fine. We intentionally split HERON syntax from RAVEN syntax most of the time, since much of the purpose of the HERON input was to make it more accessible than the RAVEN running RAVEN inputs that Aaron originally wrote. This is not a big deal, but I like the cleanness of the change. Thanks!

Copy link
Collaborator

@PaulTalbot-INL PaulTalbot-INL left a comment

Choose a reason for hiding this comment

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

Just one commented line to consider.

src/Cases.py Outdated
modelSelection.addSub(modelMethod)
optimizer.addSub(modelSelection)

# optimizer.addSub(modelSelection)
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to keep this line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope! will delete

@PaulTalbot-INL
Copy link
Collaborator

Checklist passes, merging.

We've had enough little changes as well as big fixes like this one, it might be time for a submodule update in RAVEN; @GabrielSoto-INL would you mind opening one?

@PaulTalbot-INL PaulTalbot-INL merged commit febe0ba into idaholab:devel Apr 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants