From 8ab839d905efef69db2fa2837f82c8111a064327 Mon Sep 17 00:00:00 2001 From: SkBlaz Date: Sat, 23 Jul 2022 06:02:25 +0100 Subject: [PATCH] More explicit subsample bounds check The subsample float can be further validated via 0<=subsample<1 (not only the upper bound) --- autosklearn/evaluation/train_evaluator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autosklearn/evaluation/train_evaluator.py b/autosklearn/evaluation/train_evaluator.py index f19db473bf..b7f9be73d3 100644 --- a/autosklearn/evaluation/train_evaluator.py +++ b/autosklearn/evaluation/train_evaluator.py @@ -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