Use full search range for every trial
This commit is contained in:
@@ -85,15 +85,11 @@ class StudyStore:
|
||||
trial_root = self.study_root(study.study_id) / "trials" / trial_id
|
||||
trial_root.mkdir(parents=True, exist_ok=True)
|
||||
parallel_size = _parallel_size_for_proposal(study=study, proposal=proposal)
|
||||
search_low = _derive_search_floor(study=study, state=state, parallel_size=parallel_size)
|
||||
spec = TrialSpec(
|
||||
study_id=study.study_id,
|
||||
trial_id=trial_id,
|
||||
config_patch=proposal.config_patch,
|
||||
search=replace(
|
||||
study.search,
|
||||
low=search_low,
|
||||
),
|
||||
search=study.search,
|
||||
study_spec_path=str((self.study_root(study.study_id) / "study_spec.source").resolve()),
|
||||
artifact_dir=str(trial_root),
|
||||
probe_log_path=str(trial_root / "probe_history.json"),
|
||||
@@ -305,15 +301,3 @@ def _request_rate_per_gpu(best_request_rate: Any, parallel_size: int | None) ->
|
||||
return None
|
||||
return float(best_request_rate) / float(parallel_size)
|
||||
|
||||
|
||||
def _derive_search_floor(*, study: StudySpec, state: StudyState, parallel_size: int) -> float:
|
||||
low = study.search.low
|
||||
high = study.search.high
|
||||
group_incumbent = (state.best_by_parallel_size or {}).get(str(parallel_size))
|
||||
if isinstance(group_incumbent, dict) and isinstance(
|
||||
group_incumbent.get("best_sampling_u"), (int, float)
|
||||
):
|
||||
candidate = float(group_incumbent["best_sampling_u"])
|
||||
else:
|
||||
candidate = low
|
||||
return min(high, max(low, candidate))
|
||||
|
||||
Reference in New Issue
Block a user