From 1de364d12817a7ba570c0edf4ae420b4761e6ad1 Mon Sep 17 00:00:00 2001 From: Hiroki Takizawa Date: Tue, 10 Dec 2024 12:18:41 +0900 Subject: [PATCH] Update package/samplers/hebo/sampler.py Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com> --- package/samplers/hebo/sampler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package/samplers/hebo/sampler.py b/package/samplers/hebo/sampler.py index 7b0a3d15..641fd39f 100644 --- a/package/samplers/hebo/sampler.py +++ b/package/samplers/hebo/sampler.py @@ -126,10 +126,9 @@ def _sample_relative_stateless( seed = self._rng.randint((1 << 31) - 1) hebo = HEBO(self._convert_to_hebo_design_space(search_space), scramble_seed=seed) - valid_trials = [ + params = pd.DataFrame([ t.params for t in trials if all(name in trial.params for name in search_space) - ] - params = pd.DataFrame([t.params for t in valid_trials]) + ]) values = np.array( [ sign * t.value if t.state == TrialState.COMPLETE else worst_value