Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ax/core/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# TODO: Do a more comprehensive audit of how floating point precision issues
# may creep up and implement a more principled fix
EPS = 1.5e-7
MAX_VALUES_CHOICE_PARAM = 1000
MAX_VALUES_CHOICE_PARAM = 1001
FIXED_CHOICE_PARAM_ERROR = (
"ChoiceParameters require multiple feasible values. "
"Please use FixedParameter instead when setting a single possible value."
Expand Down
6 changes: 3 additions & 3 deletions ax/core/tests/test_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,17 +490,17 @@ def test_MaxValuesValidation(self) -> None:
ChoiceParameter(
name="x",
parameter_type=ParameterType.INT,
values=list(range(999)),
values=list(range(1000)),
)
with self.assertRaisesRegex(
UserInputError,
"`ChoiceParameter` with more than 1000 values is not supported! Use a "
"`ChoiceParameter` with more than 1001 values is not supported! Use a "
"`RangeParameter` instead.",
):
ChoiceParameter(
name="x",
parameter_type=ParameterType.INT,
values=list(range(1001)),
values=list(range(1002)),
)
# With bypass_cardinality_check=True, this should not raise an error.
p = ChoiceParameter(
Expand Down
Loading