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

Log ei change #259

Merged
merged 13 commits into from
Jan 8, 2025
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ private_tests/*

# Don't include JupyterLab language server (LSP) files:
/.virtual_documents
*.csv
34 changes: 1 addition & 33 deletions docs/examples/bayes_exp/bayesian_exploration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:54:51.865697700Z",
"start_time": "2023-09-19T18:54:48.783739700Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:35.830514Z",
"iopub.status.busy": "2024-09-13T15:49:35.830266Z",
Expand Down Expand Up @@ -99,10 +95,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:54:51.916698600Z",
"start_time": "2023-09-19T18:54:51.867698800Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:37.522962Z",
"iopub.status.busy": "2024-09-13T15:49:37.522764Z",
Expand All @@ -122,10 +114,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:54:55.212579300Z",
"start_time": "2023-09-19T18:54:51.897698400Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:37.531732Z",
"iopub.status.busy": "2024-09-13T15:49:37.531635Z",
Expand All @@ -147,10 +135,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:54:55.227580Z",
"start_time": "2023-09-19T18:54:55.212579300Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:39.056947Z",
"iopub.status.busy": "2024-09-13T15:49:39.056826Z",
Expand All @@ -171,10 +155,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:54:55.947579900Z",
"start_time": "2023-09-19T18:54:55.230580300Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:39.062334Z",
"iopub.status.busy": "2024-09-13T15:49:39.062246Z",
Expand Down Expand Up @@ -238,10 +218,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:54:58.766007500Z",
"start_time": "2023-09-19T18:54:58.724008300Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:40.599399Z",
"iopub.status.busy": "2024-09-13T15:49:40.599290Z",
Expand All @@ -258,7 +234,7 @@
"for name, val in X.generator.model.named_parameters():\n",
" print(f\"{name}:{val}\")\n",
"\n",
"X.generator.model.models[2].covar_module.base_kernel.lengthscale"
"X.generator.model.models[2].covar_module.lengthscale"
]
},
{
Expand All @@ -279,10 +255,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:54:58.776010Z",
"start_time": "2023-09-19T18:54:58.746008900Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:40.605375Z",
"iopub.status.busy": "2024-09-13T15:49:40.605292Z",
Expand All @@ -302,10 +274,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-19T18:55:02.760921Z",
"start_time": "2023-09-19T18:54:58.766007500Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:49:40.611135Z",
"iopub.status.busy": "2024-09-13T15:49:40.611035Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
"for name, val in X.generator.model.named_parameters():\n",
" print(f\"{name}:{val}\")\n",
"\n",
"X.generator.model.models[2].covar_module.base_kernel.lengthscale"
"X.generator.model.models[2].covar_module.lengthscale"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/cnsga/cnsga_tnk.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
"strict: False\n",
"generator:\n",
" name: cnsga\n",
" population_size: 64\n",
" population_size: 32\n",
" population_file: test.csv\n",
" output_path: .\n",
"\n",
Expand Down Expand Up @@ -613,14 +613,14 @@
"strict: False\n",
"generator:\n",
" name: cnsga\n",
" population_size: 64\n",
" population_size: 32\n",
"\n",
"evaluator:\n",
" function: __main__.evaluate_TNK2\n",
" function_kwargs:\n",
" raise_probability: 0.1\n",
" vectorized: True\n",
" max_workers: 100 \n",
" max_workers: 32\n",
"\n",
"vocs:\n",
" variables:\n",
Expand Down
41 changes: 25 additions & 16 deletions docs/examples/gp_model_creation/model_creation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-24T14:45:11.242373800Z",
"start_time": "2024-04-24T14:45:05.850560800Z"
"end_time": "2025-01-07T21:01:37.888221500Z",
"start_time": "2025-01-07T21:01:33.895927300Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:57.465196Z",
Expand Down Expand Up @@ -84,8 +84,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-24T14:45:11.261375100Z",
"start_time": "2024-04-24T14:45:11.244374300Z"
"end_time": "2025-01-07T21:01:37.891750100Z",
"start_time": "2025-01-07T21:01:37.890225800Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:59.042358Z",
Expand All @@ -104,8 +104,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-24T14:45:13.955823900Z",
"start_time": "2024-04-24T14:45:11.260373200Z"
"end_time": "2025-01-07T21:01:38.729744700Z",
"start_time": "2025-01-07T21:01:37.892751300Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:59.045209Z",
Expand Down Expand Up @@ -148,8 +148,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-24T14:45:13.998821Z",
"start_time": "2024-04-24T14:45:13.958825500Z"
"end_time": "2025-01-07T21:01:38.736745Z",
"start_time": "2025-01-07T21:01:38.731745300Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:59.303297Z",
Expand All @@ -172,8 +172,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-24T14:45:14.007821800Z",
"start_time": "2024-04-24T14:45:13.974821300Z"
"end_time": "2025-01-07T21:06:12.904773200Z",
"start_time": "2025-01-07T21:06:12.899686500Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:59.307614Z",
Expand All @@ -185,10 +185,23 @@
"outputs": [],
"source": [
"# print real values - note that these are in normalized coordinates\n",
"print(\"outputscale:\", objective_model.covar_module.outputscale.data)\n",
"print(\"prior mean:\", objective_model.mean_module.constant.data)\n",
"print(\"noise:\", objective_model.likelihood.noise_covar.noise.data)\n",
"print(\"lengthscales\", objective_model.covar_module.base_kernel.lengthscale.data)"
"print(\"lengthscales\", objective_model.covar_module.lengthscale.data)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2025-01-07T21:02:08.637731400Z",
"start_time": "2025-01-07T21:02:08.632699900Z"
}
},
"outputs": [],
"source": [
"objective_model"
]
},
{
Expand All @@ -207,10 +220,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-24T14:49:36.001389300Z",
"start_time": "2024-04-24T14:49:35.410177700Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:59.311380Z",
"iopub.status.busy": "2024-09-13T15:56:59.311290Z",
Expand Down
17 changes: 0 additions & 17 deletions docs/examples/multi_objective_bayes_opt/mobo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -242,23 +242,6 @@
"print(candidate[[\"x1\", \"x2\"]].to_numpy())\n",
"ax.plot(*candidate[[\"x1\", \"x2\"]].to_numpy()[0], \"o\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-09-13T15:57:37.628734Z",
"iopub.status.busy": "2024-09-13T15:57:37.628594Z",
"iopub.status.idle": "2024-09-13T15:57:37.935451Z",
"shell.execute_reply": "2024-09-13T15:57:37.935103Z"
}
},
"outputs": [],
"source": [
"%%time\n",
"candidate = X.generator.generate(1)"
]
}
],
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-05T19:42:57.249481900Z",
"start_time": "2023-09-05T19:42:54.284575600Z"
"end_time": "2025-01-07T20:55:57.751261500Z",
"start_time": "2025-01-07T20:55:53.793271Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:22.206398Z",
Expand Down Expand Up @@ -74,8 +74,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-05T19:42:57.265086500Z",
"start_time": "2023-09-05T19:42:57.251814200Z"
"end_time": "2025-01-07T20:55:57.766139300Z",
"start_time": "2025-01-07T20:55:57.738794400Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:23.776855Z",
Expand Down Expand Up @@ -115,8 +115,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-05T19:42:57.283085300Z",
"start_time": "2023-09-05T19:42:57.267088500Z"
"end_time": "2025-01-07T20:55:57.766682400Z",
"start_time": "2025-01-07T20:55:57.751261500Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:23.780319Z",
Expand Down Expand Up @@ -157,8 +157,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-05T19:42:57.323085Z",
"start_time": "2023-09-05T19:42:57.284084500Z"
"end_time": "2025-01-07T20:55:57.767710800Z",
"start_time": "2025-01-07T20:55:57.766139300Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:23.786867Z",
Expand Down Expand Up @@ -199,8 +199,8 @@
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-09-05T19:44:14.815598300Z",
"start_time": "2023-09-05T19:43:54.788355100Z"
"end_time": "2025-01-07T20:57:47.398979200Z",
"start_time": "2025-01-07T20:57:37.742437900Z"
},
"execution": {
"iopub.execute_input": "2024-09-13T15:56:23.870983Z",
Expand All @@ -227,8 +227,8 @@
"\n",
" # add ground truth functions to plots\n",
" out = test_function({\"x\": test_x})\n",
" ax[0].plot(test_x, out[\"f\"], \"C0-.\")\n",
" ax[1].plot(test_x, out[\"c\"], \"C2-.\")\n",
" ax[0, 0].plot(test_x, out[\"f\"], \"C0-.\")\n",
" ax[1, 0].plot(test_x, out[\"c\"], \"C2-.\")\n",
"\n",
" # do the optimization step\n",
" X.step()"
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/single_objective_bayes_opt/custom_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@
"\n",
"fig, ax = generator.visualize_model(n_grid=len(test_x))\n",
"# plot ground truth\n",
"ax[0].plot(test_x, y(test_x), \"C0-.\")\n",
"ax[1].plot(test_x, c(test_x), \"C2-.\");"
"ax[0, 0].plot(test_x, y(test_x), \"C0-.\")\n",
"ax[1, 0].plot(test_x, c(test_x), \"C2-.\");"
]
},
{
Expand Down Expand Up @@ -260,8 +260,8 @@
"\n",
"fig, ax = generator.visualize_model(n_grid=len(test_x))\n",
"# plot ground truth\n",
"ax[0].plot(test_x, y(test_x), \"C0-.\")\n",
"ax[1].plot(test_x, c(test_x), \"C2-.\");"
"ax[0, 0].plot(test_x, y(test_x), \"C0-.\")\n",
"ax[1, 0].plot(test_x, c(test_x), \"C2-.\");"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
"generator = ExpectedImprovementGenerator(\n",
" vocs=vocs,\n",
" custom_objective=MyObjective(vocs),\n",
" log_transform_acquisition_function=True,\n",
")\n",
"X = Xopt(evaluator=evaluator, generator=generator, vocs=vocs)\n",
"print(X)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"\n",
" # plot true function\n",
" true_f = sin_function({\"x\": test_x})[\"f\"]\n",
" ax[0].plot(test_x, true_f, \"C1--\")\n",
" ax[0, 0].plot(test_x, true_f, \"C1--\")\n",
"\n",
" # do the optimization step\n",
" X.step()"
Expand Down
Loading
Loading