mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-30 13:09:40 +00:00
49d5ea49bc
serialize_torch_rng_state/deserialize_torch_rng_state only handled CPU and CUDA generators. On MPS, resumed training was not bit-exact for any stochastic op (dropout, ACT's CVAE noise) since the MPS generator's state was never saved or restored. Mirrors the existing CUDA branch using torch.mps.get_rng_state/set_rng_state (available since torch 2.11). Note: get_rng_state()/set_rng_state() (used by seeded_context()) have the same gap but are out of scope here — happy to follow up separately if useful. Co-authored-by: Sunny Dave <sunnydave@Sunnys-Mac-Studio.local> Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>