Skip to content

Commit

Permalink
Reduce number of lines
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFP committed Mar 6, 2024
1 parent dc2d9aa commit 5b1880d
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions optimas/diagnostics/ax_model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,9 @@ def _build_ax_client_from_dataframe(
# a random sampling step will be set up by Ax, and this step does not
# allow calling `model.predict`. Any strategy that uses a GP surrogate
# should work.
ax_client = AxClient(
generation_strategy=GenerationStrategy(
[
GenerationStep(
model=(
Models.GPEI if len(objectives) == 1 else Models.MOO
),
num_trials=-1,
)
]
),
verbose_logging=False,
)
model = Models.GPEI if len(objectives) == 1 else Models.MOO
gs = GenerationStrategy([GenerationStep(model=model, num_trials=-1)])
ax_client = AxClient(generation_strategy=gs, verbose_logging=False)
ax_client.create_experiment(
parameters=axparameters, objectives=axobjectives
)
Expand Down

0 comments on commit 5b1880d

Please sign in to comment.