Skip to content

Commit

Permalink
Add to public import infeasible experimenters
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 628484518
  • Loading branch information
xingyousong authored and copybara-github committed Apr 26, 2024
1 parent 233d44e commit 0b91568
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def problem_statement(self) -> vz.ProblemStatement:


@attrs.define
class ParameterRegionInfeasibleExperimenter(experimenter.Experimenter):
class ParamRegionInfeasibleExperimenter(experimenter.Experimenter):
"""Selects a parameter and splits its values into feasible/infeasible."""

exptr: experimenter.Experimenter = attrs.field()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ def test_consistency(self):
)


class ParameterRegionInfeasibleExperimenterTest(absltest.TestCase):
class ParamRegionInfeasibleExperimenterTest(absltest.TestCase):

def test_e2e(self):
exptr = numpy_experimenter.NumpyExperimenter(
bbob.Sphere, bbob.DefaultBBOBProblemStatement(2)
)
exptr = infeasible_experimenter.ParameterRegionInfeasibleExperimenter(
exptr = infeasible_experimenter.ParamRegionInfeasibleExperimenter(
exptr, parameter_name='x0', infeasible_interval=(0.0, 0.5)
)

Expand Down
2 changes: 2 additions & 0 deletions vizier/benchmarks/experimenters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
from vizier._src.benchmarks.experimenters.experimenter_factory import ExperimenterFactory
from vizier._src.benchmarks.experimenters.experimenter_factory import SerializableExperimenterFactory
from vizier._src.benchmarks.experimenters.experimenter_factory import SingleObjectiveExperimenterFactory
from vizier._src.benchmarks.experimenters.infeasible_experimenter import HashingInfeasibleExperimenter
from vizier._src.benchmarks.experimenters.infeasible_experimenter import ParamRegionInfeasibleExperimenter
from vizier._src.benchmarks.experimenters.l1_categorical_experimenter import L1CategorialExperimenter
from vizier._src.benchmarks.experimenters.multiobjective_experimenter import MultiObjectiveExperimenter
from vizier._src.benchmarks.experimenters.noisy_experimenter import NoisyExperimenter
Expand Down

0 comments on commit 0b91568

Please sign in to comment.