Skip to content

Commit

Permalink
More explicit subsample bounds check (#1545)
Browse files Browse the repository at this point in the history
The subsample float can be further validated via 0<=subsample<1 (not only the upper bound)
  • Loading branch information
SkBlaz authored Aug 3, 2022
1 parent af9d469 commit 7318999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autosklearn/evaluation/train_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def subsample_indices(
elif subsample > 1:
raise ValueError("Subsample must not be larger than 1, but is %f" % subsample)

if subsample is not None and subsample < 1:
if subsample is not None and 0 <= subsample < 1:
# Only subsample if there are more indices given to this method than
# required to subsample because otherwise scikit-learn will complain

Expand Down

0 comments on commit 7318999

Please sign in to comment.