Skip to content

skrub/choose-log-nonpositive-low

Pack Severity Fix Versions
skrub error none, edit by hand All versions

skrub.choose_float and skrub.choose_int raise ValueError("To use log space 'low' must be > 0") whenever log=True is combined with a zero or negative lower bound.

lr = skrub.choose_float(0.0, 1.0, log=True, name="lr")
lr = skrub.choose_float(1e-4, 1.0, log=True, name="lr")

Calls to choose_float or choose_int with log=True and a literal zero or negative low bound (positional or keyword).

Set low to a strictly positive value when searching in log space, or remove log=True for linear sampling.

choose_float and choose_int with log=True require low > 0 and raise ValueError for non-positive low. Use a strictly positive lower bound or drop log=True.

See all rules in the skrub pack.