Commit 3986cbd 1 parent fc391bc commit 3986cbd Copy full SHA for 3986cbd
File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -278,15 +278,11 @@ def generate_evaluation_specification(self) -> EvaluationSpecification:
278
278
):
279
279
raise OptimizerNotReady
280
280
281
+ # Generate random samples until there are enough samples where at least one of
282
+ # the objective values is available
281
283
if self .num_initial_random > 0 and (
282
- self .X .size (- 2 ) < self .num_initial_random
283
- or (
284
- torch .nonzero (~ torch .any (self .losses .isnan (), dim = 1 )).numel ()
285
- < self .num_initial_random
286
- )
284
+ sum (~ torch .any (self .losses .isnan (), dim = 1 )) < self .num_initial_random
287
285
):
288
- # We keep generating random samples until there are enough samples, and
289
- # at least one of them has a valid objective
290
286
eval_spec = EvaluationSpecification (
291
287
configuration = self .search_space .sample (),
292
288
optimizer_info = {"model_based_pick" : False },
You can’t perform that action at this time.
0 commit comments