Skip to content

Commit

Permalink
Add decorator @seed_with_default
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 619946318
  • Loading branch information
chansoo-google authored and copybara-github committed Apr 10, 2024
1 parent 6d1f13d commit beaad4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optformer/vizier/data/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
from optformer.common.data import filters
from vizier import pyvizier as vz
from vizier._src.pyglove import constants
from vizier._src.pyvizier.shared import parameter_iterators as pi
from vizier.pyvizier import converters


def _validate_parameters(
parameters: dict[str, vz.ParameterValueTypes], space: vz.SearchSpace
) -> bool:
"""Call with parameters=trial.parameters.as_dict()."""
builder = vz.SequentialParameterBuilder(space, traverse_order='bfs')
builder = pi.SequentialParameterBuilder(space, traverse_order='bfs')
try:
for pc in builder:
builder.choose_value(parameters.pop(pc.name))
Expand Down

0 comments on commit beaad4d

Please sign in to comment.