Ax
Ax copied to clipboard
ax.dev, GitHub readme, and loop tutorial examples are ignoring `minimize` kwarg
@jwatchorn pointed out to me that the example from https://ax.dev/, the GitHub readme, and the Loop API tutorial are ignoring the minimize kwarg and maximizing it instead (note these are loop API examples). I assume this is related to the deprecation of the minimize kwarg in the context of the Service API.
See this reproducer: https://colab.research.google.com/drive/1iEUgDgFO7K_B6fYSSf9YSFOacCaKvk7u?usp=sharing
from ax import optimize
best_parameters, best_values, experiment, model = optimize(
parameters=[
{
"name": "x1",
"type": "range",
"bounds": [-10.0, 10.0],
},
{
"name": "x2",
"type": "range",
"bounds": [-10.0, 10.0],
},
],
# Booth function
evaluation_function=lambda p: (p["x1"] + 2*p["x2"] - 7)**2 + (2*p["x1"] + p["x2"] - 5)**2,
minimize=True,
)
print(best_parameters)
# {'x1': -10.0, 'x2': -10.0}
print(best_values)
# ({'objective': 2593.8262505563807}, {'objective': {'objective': 10.51208881969219}})
Thanks for this great writeup with repro as usual @sgbaird! Taking a look now.
This is a bug! And the fix is up : ) (link) Thanks for this detailed report - made it super easy to find + fix.