diff --git a/tunix/rl/utils.py b/tunix/rl/utils.py index 1888368f7..13167c236 100644 --- a/tunix/rl/utils.py +++ b/tunix/rl/utils.py @@ -34,7 +34,7 @@ def is_positive_integer(value: int | None, name: str): """Checks if the value is positive.""" - if value is not None and (not value.is_integer() or value <= 0): + if value is not None and (not isinstance(value, int) or value <= 0): raise ValueError(f"{name} must be a positive integer. Got: {value}")