),"when time_budget_s is provided, cost_attr should be time_total_s"
searcher=BlendSearch(
space=search_space,
num_samples=10,
metric="mean_loss",
mode="min",
)
assert(
searcher.cost_attrisNone
),"when time_budget_s is not provided, cost_attr should be None."
searcher=BlendSearch(
space=search_space,
num_samples=10,
time_budget_s=5,
metric="mean_loss",
mode="min",
)
assert(
searcher.cost_attr=="time_total_s"
),"As long as time_budget_s is provided and cost_attr not otherwise specified (i.e., using the default auto value), time_total_s is used as the cost_attr"
searcher=BlendSearch(
space=search_space,
num_samples=10,
time_budget_s=5,
metric="mean_loss",
mode="min",
cost_attr=None,
)
assert(
searcher.cost_attrisNone
),"When the cost_attr is explicitly specified to be None, BS should use None as the cost_attr."