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

v0.1.1 #154

Merged
merged 26 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
98f2bd7
fix: typo
benjamc Jun 7, 2024
b28ff60
build: update scripts
benjamc Jun 7, 2024
d4f7604
ignore python
benjamc Jun 7, 2024
e3d0793
docs: update install instructions
Jun 11, 2024
21426e3
docs: update install instructions
Jun 11, 2024
ef4b3cd
build: fix makefile typo
Jun 11, 2024
dc77194
docs: fix typos
Jun 11, 2024
99b2117
build: updates for hpobench installation
Jun 11, 2024
436cc13
build: updates for hpobench installation
Jun 11, 2024
a6847b7
Merge branch 'main' into development
benjamc Jun 11, 2024
55461a8
Add logo to README.md + docs; adapt docs theme colors to logo
helegraf Jun 11, 2024
92f7822
Merge pull request #136 from automl/docs/update-install-instruct
sarah-segel Jun 11, 2024
8260032
Actually add the logo file
helegraf Jun 11, 2024
0b238a6
Merge pull request #137 from automl/enhancement/logo
sarah-segel Jun 11, 2024
8515bfa
fix: changelog entry for initial version
Jun 11, 2024
61beaad
add running data to readme (#139)
dengdifan Jun 11, 2024
9f1e36b
Update plotting
benjamc Jun 11, 2024
4768223
Merge branch 'main' of github.com:automl/SMACBenchmarking into develo…
Jun 12, 2024
291267c
Update filepath
benjamc Jun 20, 2024
395bc41
fix(check_missing.py): Fix criterion for max trials (#150)
benjamc Jun 28, 2024
857e140
Fix HEBO integration (#149)
benjamc Jun 28, 2024
49dd773
Update CHANGELOG.md
benjamc Jun 28, 2024
fd6ef66
Update version number 0.1.0->0.1.1
benjamc Jun 28, 2024
7d8b219
Feat/plotting (#152)
benjamc Jun 28, 2024
62a0af8
Fix/dist (#153)
benjamc Jun 29, 2024
ab55d8a
Merge branch 'main' into development
benjamc Jul 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Version 0.1.0

# v0.1.1

## Bug Fixes
- Fix HEBO integration (#149)
- Fix plotting and data gathering

dengdifan marked this conversation as resolved.
Show resolved Hide resolved
# v0.1.0

- Initial version of CARP-S.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ url: "https://automl.github.io/CARP-S/main/"

repository-code: "https://github.com/automl/CARP-S"

version: "0.1.0"
version: "0.1.1"

type: "template"
keywords:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL := /bin/bash

NAME := CARP-S
PACKAGE_NAME := carps
VERSION := 0.1.0
VERSION := 0.1.1

DIST := dist

Expand Down
36 changes: 36 additions & 0 deletions carps/analysis/concat_rundata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from __future__ import annotations
import pandas as pd
from carps.analysis.gather_data import load_set, convert_mixed_types_to_str

def concat_rundata():
paths = {
"BBsubset": {
"dev": ["runs_subset_BB/dev"],
"test": ["runs_subset_BB/test"],
},
"MFsubset": {
"dev": ["runs_subset_MF/dev"],
"test": ["runs_subset_MF/test"],
},
"MOsubset": {
"dev": ["runs_subset_MO/dev"],
"test": ["runs_subset_MO/test"],
},
"MOMFsubset": {
"dev": ["runs_subset_MOMF/dev"],
"test": ["runs_subset_MOMF/test"],
},
}

args = []
for item in paths.values():
for k,v in item.items():
from pathlib import Path
args.append((v,k))
res = [load_set(paths=a[0], set_id=a[1]) for a in args]
df = pd.concat([r[0] for r in res]).reset_index(drop=True)
df = convert_mixed_types_to_str(df)
df.to_parquet("rundata.parquet")

if __name__ == "__main__":
concat_rundata()
187 changes: 0 additions & 187 deletions carps/analysis/interval_estimates.py

This file was deleted.

6 changes: 3 additions & 3 deletions carps/analysis/performance_over_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
if TYPE_CHECKING:
import pandas as pd

def get_order_by_mean(df: pd.DataFrame) -> list[str]:
final_df = filter_only_final_performance(df)
def get_order_by_mean(df: pd.DataFrame, budget_var: str = "n_trials_norm") -> list[str]:
final_df = filter_only_final_performance(df, budget_var=budget_var)
reduced = final_df.groupby(by="optimizer_id")["trial_value__cost_inc_norm"].apply(np.nanmean)
reduced = reduced.sort_values()
return reduced.index.tolist()
Expand All @@ -33,7 +33,7 @@ def plot_performance_over_time(
**lineplot_kwargs,
) -> tuple[plt.Figure, matplotlib.axes.Axes]:
setup_seaborn(font_scale=1.5)
sorter = get_order_by_mean(df=df)
sorter = get_order_by_mean(df=df, budget_var=x)
df = df.sort_values(by="optimizer_id", key=lambda column: column.map(lambda e: sorter.index(e)))
palette = get_color_palette(df)
fig = plt.figure(figsize=figsize)
Expand Down
2 changes: 1 addition & 1 deletion carps/benchmarks/hpo_b.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def __init__(
if not surrogates_file.is_file():
raise RuntimeError(
"It seems that the surrogate files have not been downloaded. Please run "
"'bash container_recipes/benchmarks/hpob/download_data.sh' to download the "
"'bash container_recipes/benchmarks/HPOB/download_data.sh' to download the "
"surrogates."
)
with open(str(surrogates_file)) as f:
Expand Down
1 change: 0 additions & 1 deletion carps/optimizers/hebo.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ def tell(self, trial_info: TrialInfo, trial_value: TrialValue) -> None:
cost = trial_value.cost
suggestion = self.convert_from_trial(trial_info=trial_info)

self.trial_counter += 1
cost = np.asarray([cost]) if isinstance(cost, abc.Sequence) else np.asarray(cost)

self._solver.observe(suggestion, np.asarray([cost]))
Expand Down
2 changes: 1 addition & 1 deletion carps/utils/check_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_experiment_status(path: Path) -> dict:
if trial_logs_fn.is_file():
trial_logs = read_jsonl_content(str(trial_logs_fn))
n_trials_done = trial_logs["n_trials"].max()
status = RunStatus.COMPLETED if n_trials == n_trials_done else RunStatus.TRUNCATED
status = RunStatus.COMPLETED if n_trials >= n_trials_done else RunStatus.TRUNCATED

overrides = OmegaConf.load(path.parent / "overrides.yaml")
# TODO maybe filter cluster
Expand Down
31 changes: 1 addition & 30 deletions notebooks/calc_runtime.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,10 @@
from __future__ import annotations

from carps.analysis.gather_data import load_set, convert_mixed_types_to_str
from carps.analysis.utils import filter_only_final_performance
import pandas as pd
import multiprocessing

paths = {
"BBsubset": {
"dev": ["../runs_subset_BB/dev"],
"test": ["../runs_subset_BB/test"],
},
"MFsubset": {
"dev": ["../runs_subset_MF/dev"],
"test": ["../runs_subset_MF/test"],
},
"MOsubset": {
"dev": ["../runs_subset_MO/dev"],
"test": ["../runs_subset_MO/test"],
},
"MOMFsubset": {
"dev": ["../runs_subset_MOMF/dev"],
"test": ["../runs_subset_MOMF/test"],
},
}



# args = []
# for item in paths.values():
# for k,v in item.items():
# args.append((v,k))
# res = [load_set(paths=a[0], set_id=a[1]) for a in args]
# df = pd.concat([r[0] for r in res]).reset_index(drop=True)
# df = convert_mixed_types_to_str(df)
# df.to_parquet("rundata.parquet")
concat_rundata()

df = pd.read_parquet("rundata.parquet")
df_final = filter_only_final_performance(df=df, budget_var="n_trials")
Expand Down
Loading