diff --git a/doc/changelog.rst b/doc/changelog.rst index e212eb61..e64a7300 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -15,6 +15,7 @@ MJX Bug fixes 1. Fix typos and supported fields in the docs (fixes :github:issue:`1105` and :github:issue:`1106`). 2. Fix bug where mixed `jnt_limited` joints are not being constrained correctly. +3. Make `device_put` type validation more verbose (fixed :github:issue:`1113`). Version 3.0.0 (October 18, 2023) -------------------------------- diff --git a/mjx/mujoco/mjx/_src/device.py b/mjx/mujoco/mjx/_src/device.py index 3c3c213f..a917e7f9 100644 --- a/mjx/mujoco/mjx/_src/device.py +++ b/mjx/mujoco/mjx/_src/device.py @@ -116,8 +116,9 @@ def _validate(m: mujoco.MjModel): typs = set(val) if isinstance(val, Iterable) else {val} unsupported_typs = typs - set(_TYPE_MAP[mj_type]) - if unsupported_typs: - raise NotImplementedError(f'{unsupported_typs} not implemented.') + unsupported = [mj_type(t) for t in unsupported_typs] + if unsupported: + raise NotImplementedError(f'{unsupported} not implemented.') # check condim if any(dim != 3 for dim in m.geom_condim) or any(