Ax icon indicating copy to clipboard operation
Ax copied to clipboard

API docs still show usage of minimize=True and objective_name="branin" despite deprecation warning

Open sgbaird opened this issue 2 years ago • 1 comments

See https://ax.dev/docs/api.html

/home/vscode/.local/lib/python3.10/site-packages/ax/service/ax_client.py:350: DeprecationWarning: objective_name and minimize are deprecated

image

sgbaird avatar Dec 12 '23 19:12 sgbaird

Thanks for the heads up, let me put up a PR right now to fix that. Also, this tutorial for the Service API specifically might be a better resource (and has a correct snippet for create_experiment already).

ax_client.create_experiment(
    name="hartmann_test_experiment",
    parameters=[
        {
            "name": "x1",
            "type": "range",
            "bounds": [-5.0, 10.0],
            "value_type": "float",  # Optional, defaults to inference from type of "bounds".
            "log_scale": False,  # Optional, defaults to False.
        },
        {
            "name": "x2",
            "type": "range",
            "bounds": [0.0, 10.0],
        },
    ],
    objectives={"branin": ObjectiveProperties(minimize=True)},
)

mpolson64 avatar Dec 12 '23 19:12 mpolson64