-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sarah Segel: Merge pull request #103 from automl/bugfix/api-examples
- Loading branch information
Github Actions
committed
Jan 17, 2024
1 parent
c7832a6
commit 83237d1
Showing
166 changed files
with
3,475 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: cc40638524a75869b5752aca302f69f8 | ||
config: 19058a216288311270b2d5b6ce1eaac4 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+302 Bytes
(100%)
development/.doctrees/examples/api/parallel_coordinates.doctree
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+2.36 KB
(130%)
development/.doctrees/examples/api/sg_execution_times.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
development/_downloads/99282791bd8a0f766c85ce43b212a6b7/pdp.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# Partial Dependencies\n\nThis example shows how to use the plugin Partial Dependencies.\nNote that other plugins use the same interfaces and can be used in the same fashion.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from deepcave.plugins.hyperparameter.pdp import PartialDependencies\nfrom deepcave.runs.converters.deepcave import DeepCAVERun\nfrom pathlib import Path\n\n\nif __name__ == \"__main__\":\n # Instantiate the run\n run = DeepCAVERun.from_path(Path(\"logs/DeepCAVE/minimal/run_2\"))\n objective_id = run.get_objective_ids()[0]\n budget_id = run.get_budget_ids()[-1]\n\n # Instantiate the plugin\n plugin = PartialDependencies()\n inputs = plugin.generate_inputs(\n hyperparameter_name_1=\"alpha\",\n hyperparameter_name_2=\"beta\",\n objective_id=objective_id,\n budget_id=budget_id,\n show_confidence=False,\n show_ice=True,\n )\n # Note: Filter variables are not considered.\n outputs = plugin.generate_outputs(run, inputs)\n\n # Finally, you can load the figure. Here, the filter variables play a role.\n # Alternatively: Use the matplotlib output (`load_mpl_outputs`) if available.\n figure = plugin.load_outputs(run, inputs, outputs) # plotly.go figure\n figure.write_image(\"examples/api/pdp.png\")\n #figure.show()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.18" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
43 changes: 43 additions & 0 deletions
43
development/_downloads/aabae18a223fa014a3ff3692699ee5e2/importances.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# Importances\n\nThis example shows how to use the plugin Importances.\nNote that other plugins use the same interfaces and can be used in the same fashion.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from deepcave.plugins.hyperparameter.importances import Importances\nfrom deepcave.runs.converters.deepcave import DeepCAVERun\nfrom pathlib import Path\n\n\nif __name__ == \"__main__\":\n # Instantiate the run\n run = DeepCAVERun.from_path(Path(\"logs/DeepCAVE/minimal/run_2\"))\n\n objective_id = run.get_objective_ids()[0]\n budget_ids = run.get_budget_ids()\n\n # Instantiate the plugin\n plugin = Importances()\n inputs = plugin.generate_inputs(\n hyperparameter_names=run.configspace.get_hyperparameter_names(),\n objective_id=objective_id,\n budget_ids=budget_ids,\n method=\"global\",\n n_hps=3,\n n_trees=10\n )\n # Note: Filter variables are not considered.\n outputs = plugin.generate_outputs(run, inputs)\n\n # Finally, you can load the figure. Here, the filter variables play a role.\n # Alternatively: Use the matplotlib output (`load_mpl_outputs`) if available.\n figure = plugin.load_outputs(run, inputs, outputs) # plotly.go figure\n figure.write_image(\"examples/api/importances.png\", scale=2.)\n # figure.show()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.18" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
Binary file modified
BIN
+2.82 KB
(120%)
development/_downloads/bc82bea3a5dd7bdba60b65220891d9e5/examples_python.zip
Binary file not shown.
37 changes: 37 additions & 0 deletions
37
development/_downloads/e839af13aa37ae3d835848af3db8e085/pdp.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
Partial Dependencies | ||
^^^^^^^^^^^^^^^^^^^^ | ||
This example shows how to use the plugin Partial Dependencies. | ||
Note that other plugins use the same interfaces and can be used in the same fashion. | ||
""" | ||
|
||
from deepcave.plugins.hyperparameter.pdp import PartialDependencies | ||
from deepcave.runs.converters.deepcave import DeepCAVERun | ||
from pathlib import Path | ||
|
||
|
||
if __name__ == "__main__": | ||
# Instantiate the run | ||
run = DeepCAVERun.from_path(Path("logs/DeepCAVE/minimal/run_2")) | ||
objective_id = run.get_objective_ids()[0] | ||
budget_id = run.get_budget_ids()[-1] | ||
|
||
# Instantiate the plugin | ||
plugin = PartialDependencies() | ||
inputs = plugin.generate_inputs( | ||
hyperparameter_name_1="alpha", | ||
hyperparameter_name_2="beta", | ||
objective_id=objective_id, | ||
budget_id=budget_id, | ||
show_confidence=False, | ||
show_ice=True, | ||
) | ||
# Note: Filter variables are not considered. | ||
outputs = plugin.generate_outputs(run, inputs) | ||
|
||
# Finally, you can load the figure. Here, the filter variables play a role. | ||
# Alternatively: Use the matplotlib output (`load_mpl_outputs`) if available. | ||
figure = plugin.load_outputs(run, inputs, outputs) # plotly.go figure | ||
figure.write_image("examples/api/pdp.png") | ||
#figure.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
development/_downloads/f0660e643860808c88e59e2b47bd432b/importances.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
Importances | ||
^^^^^^^^^^^^^^^^^^^^ | ||
This example shows how to use the plugin Importances. | ||
Note that other plugins use the same interfaces and can be used in the same fashion. | ||
""" | ||
|
||
from deepcave.plugins.hyperparameter.importances import Importances | ||
from deepcave.runs.converters.deepcave import DeepCAVERun | ||
from pathlib import Path | ||
|
||
|
||
if __name__ == "__main__": | ||
# Instantiate the run | ||
run = DeepCAVERun.from_path(Path("logs/DeepCAVE/minimal/run_2")) | ||
|
||
objective_id = run.get_objective_ids()[0] | ||
budget_ids = run.get_budget_ids() | ||
|
||
# Instantiate the plugin | ||
plugin = Importances() | ||
inputs = plugin.generate_inputs( | ||
hyperparameter_names=run.configspace.get_hyperparameter_names(), | ||
objective_id=objective_id, | ||
budget_ids=budget_ids, | ||
method="global", | ||
n_hps=3, | ||
n_trees=10 | ||
) | ||
# Note: Filter variables are not considered. | ||
outputs = plugin.generate_outputs(run, inputs) | ||
|
||
# Finally, you can load the figure. Here, the filter variables play a role. | ||
# Alternatively: Use the matplotlib output (`load_mpl_outputs`) if available. | ||
figure = plugin.load_outputs(run, inputs, outputs) # plotly.go figure | ||
figure.write_image("examples/api/importances.png", scale=2.) | ||
# figure.show() |
Binary file modified
BIN
+4.4 KB
(120%)
development/_downloads/fb625db3c50d423b1b7881136ffdeec8/examples_jupyter.zip
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.