python3Packages.brax: fix mujoco incompatibility
This commit is contained in:
@@ -54,13 +54,21 @@ buildPythonPackage (finalAttrs: {
|
||||
./dont-use-device_put_replicated-compat.patch
|
||||
];
|
||||
|
||||
# TypeError: clip() got an unexpected keyword argument 'a_min'
|
||||
postPatch = ''
|
||||
substituteInPlace brax/fluid.py \
|
||||
--replace-fail \
|
||||
"box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), a_min=1e-12)" \
|
||||
"box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), min=1e-12)"
|
||||
'';
|
||||
postPatch =
|
||||
# TypeError: clip() got an unexpected keyword argument 'a_min'
|
||||
''
|
||||
substituteInPlace brax/fluid.py \
|
||||
--replace-fail \
|
||||
"box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), a_min=1e-12)" \
|
||||
"box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), min=1e-12)"
|
||||
''
|
||||
# mujoco >= 3.10 changed mj_fullM's signature from (m, dst, qM) to (m, d, dst).
|
||||
+ ''
|
||||
substituteInPlace brax/generalized/mass_test.py \
|
||||
--replace-fail \
|
||||
"mujoco.mj_fullM(model, mj_mass_mx, mj_next.qM)" \
|
||||
"mujoco.mj_fullM(model, mj_next, mj_mass_mx)"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
hatchling
|
||||
|
||||
Reference in New Issue
Block a user