Skip to content

Commit

Permalink
Merge pull request #87 from automl/fix_doc_example
Browse files Browse the repository at this point in the history
Fix examples for docs
  • Loading branch information
Bronzila authored May 14, 2024
2 parents f6f1992 + 74fbf09 commit 3b3a53a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/getting_started/single_worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ optimizer = DEHB(

# Run optimization for 1 bracket. Output files will be saved to ./logs
traj, runtime, history = optimizer.run(brackets=1, verbose=True)
config, fitness, runtime, fidelity, _ = history[0]
config_id, config, fitness, runtime, fidelity, _ = history[0]
print("config", config)
print("fitness", fitness)
print("runtime", runtime)
Expand Down
2 changes: 1 addition & 1 deletion examples/01.1_Optimizing_RandomForest_using_DEHB.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
"\n",
"# Last recorded function evaluation\n",
"last_eval = history[-1]\n",
"config, score, cost, fidelity, _info = last_eval\n",
"config_id, config, score, cost, fidelity, _info = last_eval\n",
"\n",
"print(\"Last evaluated configuration, \")\n",
"print(dehb.vector_to_configspace(config), end=\"\")\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/01.2_Optimizing_RandomForest_using_Ask_Tell.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"\n",
"# Last recorded function evaluation\n",
"last_eval = history[-1]\n",
"config, score, cost, fidelity, _info = last_eval\n",
"config_id, config, score, cost, fidelity, _info = last_eval\n",
"\n",
"print(\"Last evaluated configuration, \")\n",
"print(dehb.vector_to_configspace(config), end=\"\")\n",
Expand Down Expand Up @@ -634,7 +634,7 @@
"\n",
"# Last recorded function evaluation\n",
"last_eval = history[-1]\n",
"config, score, cost, fidelity, _info = last_eval\n",
"config_id, config, score, cost, fidelity, _info = last_eval\n",
"\n",
"print(\"Last evaluated configuration, \")\n",
"print(dehb.vector_to_configspace(config), end=\"\")\n",
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ dev = [
"pre-commit",
]
examples = [
"scikit-learn"
"scikit-learn",
"matplotlib",
]

[tool.pytest.ini_options]
Expand Down

0 comments on commit 3b3a53a

Please sign in to comment.