Skip to content

Commit 4d1bd2c

Browse files
sagipecopybara-github
authored andcommitted
Added a test study with boolean parameters.
PiperOrigin-RevId: 752548132
1 parent 1de6398 commit 4d1bd2c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

vizier/testing/test_studies.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ def flat_categorical_space() -> vz.SearchSpace:
4141
return space
4242

4343

44+
def flat_boolean_space() -> vz.SearchSpace:
45+
"""Search space with boolean parameter types, encoded as categorical."""
46+
47+
space = vz.SearchSpace()
48+
root = space.root
49+
root.add_bool_param('bool_0')
50+
root.add_bool_param('bool_1')
51+
root.add_bool_param('bool_2')
52+
root.add_bool_param('bool_3')
53+
return space
54+
55+
4456
def flat_continuous_space_with_scaling_trials(
4557
count: int = 1,
4658
) -> list[vz.TrialSuggestion]:

0 commit comments

Comments
 (0)