From dc6469d69aa7d0d9675a10ce200fb812602d289a Mon Sep 17 00:00:00 2001 From: CarolinePascal Date: Fri, 12 Jun 2026 19:52:45 +0200 Subject: [PATCH] fix(pyav check): fixing PyAV option validation for integer codec options by normalizing numeric values before calling `is_integer()` Co-authored-by: Wensi (Vince) Ai <59036629+wensi-ai@users.noreply.github.com> --- src/lerobot/datasets/pyav_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lerobot/datasets/pyav_utils.py b/src/lerobot/datasets/pyav_utils.py index 4745058ca..20a526b68 100644 --- a/src/lerobot/datasets/pyav_utils.py +++ b/src/lerobot/datasets/pyav_utils.py @@ -109,7 +109,7 @@ def _check_option_value(vcodec: str, label: str, value: Any, opt: av.option.Opti f"{label}={value!r} is not numeric; codec {vcodec!r} expects a number for this option." ) from e elif isinstance(value, (float, int)): - num_val = value + num_val = float(value) else: raise ValueError( f"{label}={value!r} is not numeric; codec {vcodec!r} expects a number for this option."