mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-04 16:47:14 +00:00
ca6d764107
Add get_safe_autocast_context helper that only enters torch.autocast on devices supporting AMP (cuda, xpu, cpu) and falls back to a no-op on mps and unknown backends. Route the previously unconditional/underspecified autocasts (vla_jepa, groot, molmoact2, lerobot_eval) through it so autocast can be requested unconditionally without breaking on unsupported devices.