Skip to content

Commit

Permalink
rename fn arg from parameters to parameterization to avoid confusion …
Browse files Browse the repository at this point in the history
…with parameters dictionary (also in line with the way the evaluate function is defined in the loop API https://ax.dev/tutorials/gpei_hartmann_loop.html#1.-Define-evaluation-function)
  • Loading branch information
sgbaird authored Jan 12, 2024
1 parent 200168e commit b6fbfee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tutorials/gpei_hartmann_service.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
"import numpy as np\n",
"\n",
"\n",
"def evaluate(parameters):\n",
" x = np.array([parameters.get(f\"x{i+1}\") for i in range(6)])\n",
"def evaluate(parameterization):\n",
" x = np.array([parameterization.get(f\"x{i+1}\") for i in range(6)])\n",
" # In our case, standard error is 0, since we are computing a synthetic function.\n",
" return {\"hartmann6\": (hartmann6(x), 0.0), \"l2norm\": (np.sqrt((x**2).sum()), 0.0)}"
]
Expand Down Expand Up @@ -158,9 +158,9 @@
"outputs": [],
"source": [
"for i in range(25):\n",
" parameters, trial_index = ax_client.get_next_trial()\n",
" parameterization, trial_index = ax_client.get_next_trial()\n",
" # Local evaluation here can be replaced with deployment to external system.\n",
" ax_client.complete_trial(trial_index=trial_index, raw_data=evaluate(parameters))"
" ax_client.complete_trial(trial_index=trial_index, raw_data=evaluate(parameterization))"
]
},
{
Expand Down

0 comments on commit b6fbfee

Please sign in to comment.