Skip to content

Commit

Permalink
hypothesis error.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jun 29, 2023
1 parent 19dc937 commit 0190537
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python-package/xgboost/testing/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

strategies = pytest.importorskip("hypothesis.strategies")

max_leaves = [2**i + 1 for i in range(0, 10)] + [0]

exact_parameter_strategy = strategies.fixed_dictionaries(
{
Expand All @@ -27,7 +27,7 @@
hist_parameter_strategy = strategies.fixed_dictionaries(
{
"max_depth": strategies.integers(1, 11),
"max_leaves": strategies.integers(0, 1024),
"max_leaves": strategies.sampled_from(max_leaves),
"max_bin": strategies.integers(2, 512),
"grow_policy": strategies.sampled_from(["lossguide", "depthwise"]),
"min_child_weight": strategies.floats(0.5, 2.0),
Expand All @@ -44,7 +44,7 @@
hist_multi_parameter_strategy = strategies.fixed_dictionaries(
{
"max_depth": strategies.integers(1, 11),
"max_leaves": strategies.integers(0, 1024),
"max_leaves": strategies.sampled_from(max_leaves),
"max_bin": strategies.integers(2, 512),
"multi_strategy": strategies.sampled_from(
["multi_output_tree", "one_output_per_tree"]
Expand Down

0 comments on commit 0190537

Please sign in to comment.