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

Enable new ax #255

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Enable new ax #255

wants to merge 25 commits into from

Conversation

shuds13
Copy link
Collaborator

@shuds13 shuds13 commented Feb 6, 2025

A continuation of #239

I have got the tests to work with Ax 0.5.0+.

Due to the number of code changes in that release,  I suggest we require this is a minimal version.

  • Should be checked by user of Ax genertors.

Note there is also still quite a number of warnings, mostly deprecation warnings from dependencies.

Details

  • The multitask example has been updated and now works in the Standalone example.

  • I don't know if all the new fields in MT_MTGP_trans are necessary

  • The Single Fidelity example also needs updates for Ax 0.5.0

  • It looks like the different models GPEI, MOO have been replaced by BOTORCH_MODULAR (and FULLYBAYESIANMOO/ FULLYBAYESIAN by SAASBO), which apparently infers acquisition function from the optimization config (e.g., the number of objectives). The single fidelity test runs with this.

  • test_ax_generators.py:

  • This change is also required in test_ax_generators.py

            # assert df["generation_method"].to_numpy()[-1] == "GPEI"
            assert df["generation_method"].to_numpy()[-1] == "BoTorch"
  • Fails in test_ax_generators.py -> test_ax_multi_fidelity():
    TypeError: Unexpected keyword argument X_pending when constructing input arguments for construct_inputs_qMFKG.' Similar for constraints. It runs if I remove these from acquisition_options.

  • In test test_ax_service_init() assert df["generation_method"][j] == "Manual" fails, getting None instead for the user added trial. It seems to happen since _maybe_transition_to_next_node() is called (previously _maybe_move_to_next_step()) in optimas/generators/ax/service.base.py and generation_methods.add("Manual") in Ax's report_utils.py does not get run. For now, changed test to expect None but this should be checked. Otherwise test seems to function correctly with these trials replacing the sobol steps.

see:
https://github.com/facebook/Ax/releases/tag/0.5.0 (fifth bullet).
https://ax.dev/docs/models/ (using BOTORCH_MODULAR)

@shuds13 shuds13 requested review from RemiLehe and ax3l February 17, 2025 20:51
Comment on lines +88 to +89
"""Instantiates a Multi-task Gaussian Process (MTGP) model that generates
points with EI.
Copy link
Collaborator

Choose a reason for hiding this comment

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

CI seems to request a small formatting change here:

pydocstyle...............................................................Failed
- hook id: pydocstyle
- exit code: 1

optimas/generators/ax/developer/multitask.py:88 in public function `get_MTGP`:
        D202: No blank lines allowed after function docstring (found 1)
optimas/generators/ax/developer/multitask.py:88 in public function `get_MTGP`:
        D205: 1 blank line required between summary line and description (found 0)
optimas/generators/ax/developer/multitask.py:88 in public function `get_MTGP`:
        D400: First line should end with a period (not 's')
optimas/generators/ax/developer/multitask.py:88 in public function `get_MTGP`:
        D401: First line should be in imperative mood (perhaps 'Instantiate', not 'Instantiates')

@ax3l ax3l requested a review from AngelFP February 18, 2025 17:19
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.

3 participants