Skip to content

Commit cf042eb

Browse files
sagipecopybara-github
authored andcommitted
Add profiling around seed trial generation to help debug slow runs.
PiperOrigin-RevId: 567208089
1 parent cb51d07 commit cf042eb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

vizier/_src/algorithms/designers/gp_bandit.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,11 @@ def _generate_seed_trials(self, count: int) -> Sequence[vz.TrialSuggestion]:
294294
parameters, metadata=vz.Metadata({'seeded': 'center'})
295295
)
296296
)
297-
if (remaining_counts := count - len(seed_suggestions)) > 0:
298-
seed_suggestions.extend(
299-
self._quasi_random_sampler.suggest(remaining_counts)
300-
)
297+
with profiler.timeit('quasi_random_sampler_seed_trials'):
298+
if (remaining_counts := count - len(seed_suggestions)) > 0:
299+
seed_suggestions.extend(
300+
self._quasi_random_sampler.suggest(remaining_counts)
301+
)
301302
return seed_suggestions
302303

303304
@_experimental_override_allowed

0 commit comments

Comments
 (0)