diffneusim 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diffneusim/__init__.py +1 -0
- diffneusim/_cache.py +42 -0
- diffneusim/_paths.py +5 -0
- diffneusim/bindings/rew14_ext.cu +115 -0
- diffneusim/bindings/soft14_capi.cpp +443 -0
- diffneusim/bindings/soft14_engine_ext.cu +596 -0
- diffneusim/bindings/soft_capi.cpp +782 -0
- diffneusim/bindings/soft_engine_ext.cu +495 -0
- diffneusim/core/cpu_engine/build.sh +40 -0
- diffneusim/core/cpu_engine/fiber/cuda_runtime.h +445 -0
- diffneusim/core/cpu_engine/x14_cpu.cpp +283 -0
- diffneusim/core/diff/dual.h +126 -0
- diffneusim/core/include/diffneusim/macros.h +35 -0
- diffneusim/core/kin/kinematic_tree.h +273 -0
- diffneusim/core/math/so3.h +182 -0
- diffneusim/core/soft/adj/out_adj.h +102 -0
- diffneusim/core/soft/adj/rnea_adj.h +425 -0
- diffneusim/core/soft/adj/rows_adj.h +439 -0
- diffneusim/core/soft/adj/rows_functor.h +89 -0
- diffneusim/core/soft/adj/rows_lanes.h +443 -0
- diffneusim/core/soft/adj/shell_adj.h +243 -0
- diffneusim/core/soft/adj/tree_adj.h +356 -0
- diffneusim/core/soft/collide.h +183 -0
- diffneusim/core/soft/gpu/adj14.cuh +233 -0
- diffneusim/core/soft/gpu/adj14_mus.cuh +98 -0
- diffneusim/core/soft/gpu/adj_shell.cuh +50 -0
- diffneusim/core/soft/gpu/adj_tab.cuh +49 -0
- diffneusim/core/soft/gpu/body14.cuh +47 -0
- diffneusim/core/soft/gpu/chol_rn.cuh +458 -0
- diffneusim/core/soft/gpu/chol_small.cuh +123 -0
- diffneusim/core/soft/gpu/chol_split.cuh +193 -0
- diffneusim/core/soft/gpu/engine_launch.cuh +263 -0
- diffneusim/core/soft/gpu/fk_rn.cuh +109 -0
- diffneusim/core/soft/gpu/generated/body_019e20820f86_mmfloor.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_62f77a4bb16b_mmfloor.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor.cuh +25 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +25 -0
- diffneusim/core/soft/gpu/generated/g1_soft_5db44fd45286.cuh +74 -0
- diffneusim/core/soft/gpu/generated/split_62f77a4bb16b_mmfloor.cuh +18 -0
- diffneusim/core/soft/gpu/generated/split_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +18 -0
- diffneusim/core/soft/gpu/generated/x14_soft_019e20820f86_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_62f77a4bb16b_mmfloor.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/k_mus.cuh +1038 -0
- diffneusim/core/soft/gpu/k_mus_host.cuh +377 -0
- diffneusim/core/soft/gpu/k_pre.cuh +52 -0
- diffneusim/core/soft/gpu/kernel_p.cuh +490 -0
- diffneusim/core/soft/gpu/kp14.cuh +465 -0
- diffneusim/core/soft/gpu/l2v2.cuh +367 -0
- diffneusim/core/soft/gpu/l2x14.cuh +319 -0
- diffneusim/core/soft/gpu/l3.cuh +1483 -0
- diffneusim/core/soft/gpu/model_view.cuh +48 -0
- diffneusim/core/soft/gpu/mus_case_fits.h +15 -0
- diffneusim/core/soft/gpu/mus_classes.h +182 -0
- diffneusim/core/soft/gpu/mus_row_cf.h +44 -0
- diffneusim/core/soft/gpu/rew14.cuh +177 -0
- diffneusim/core/soft/gpu/rows_ctab.cuh +44 -0
- diffneusim/core/soft/gpu/tree_m.cuh +247 -0
- diffneusim/core/soft/gpu/x14_engine_kernels.cuh +260 -0
- diffneusim/core/soft/gpu/x14_rowcf.h +14 -0
- diffneusim/core/soft/hand.h +124 -0
- diffneusim/core/soft/impedance.h +115 -0
- diffneusim/core/soft/jvp.h +202 -0
- diffneusim/core/soft/kin.h +250 -0
- diffneusim/core/soft/muscle.h +1208 -0
- diffneusim/core/soft/newton.h +371 -0
- diffneusim/core/soft/rows.h +176 -0
- diffneusim/core/soft/step.h +188 -0
- diffneusim/core/soft/tape.h +313 -0
- diffneusim/core/soft/x14/collide14.h +69 -0
- diffneusim/core/soft/x14/jvp14.h +182 -0
- diffneusim/core/soft/x14/law14.h +453 -0
- diffneusim/core/soft/x14adj/collide14_adj.h +134 -0
- diffneusim/core/soft/x14adj/passive14_adj.h +162 -0
- diffneusim/core/soft/x14adj/reward14.h +484 -0
- diffneusim/core/soft/x14adj/rows14_adj.h +400 -0
- diffneusim/core/soft/x14adj/scan14.h +349 -0
- diffneusim/core/soft/x14adj/shell14_adj.h +122 -0
- diffneusim/core/soft/x14adj/sweep14.h +255 -0
- diffneusim/core/soft/x14adj/tree14_adj.h +500 -0
- diffneusim/core/soft/x14adj/x14adj_common.h +96 -0
- diffneusim/data/mirror/H1622v2k_geyer_hfdeq.npz +0 -0
- diffneusim/data/mirror/H1622v2k_hfd.npz +0 -0
- diffneusim/data/mirror/H1622v2k_millard_hfdeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_calf2_pe.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01legs.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01lumbar.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_hinge.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_compound_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_luispe.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_trunk0701.npz +0 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01legs.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01lumbar.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1a.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n2.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_rom23.json +91 -0
- diffneusim/data/reference/musclemimic/myofullbody_mimic_sites.json +261 -0
- diffneusim/data/reference/pose3/pose3_scone.json +305 -0
- diffneusim/data/reference/pose3/pose3_scone.txt +3 -0
- diffneusim/data/reference/pose3/pose3_scone_gait.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_mirror.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_stand.npz +0 -0
- diffneusim/data/reference/x016run/MD5SUMS +241 -0
- diffneusim/data/reference/x016run/x016run_states.txt +240 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r3.npz +0 -0
- diffneusim/data/state_prior/lumbar_poly_fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/engine/__init__.py +0 -0
- diffneusim/engine/build_tag.py +52 -0
- diffneusim/engine/case_tables.py +46 -0
- diffneusim/engine/d16_body.py +80 -0
- diffneusim/engine/engine14.py +367 -0
- diffneusim/engine/gen_split.py +159 -0
- diffneusim/engine/hand_format.py +69 -0
- diffneusim/engine/live14.py +149 -0
- diffneusim/engine/phase_b_tree.py +137 -0
- diffneusim/engine/soft14.py +130 -0
- diffneusim/engine/soft_capi.py +373 -0
- diffneusim/engine/soft_engine.py +165 -0
- diffneusim/engine/step14.py +132 -0
- diffneusim/engine/tape_format.py +89 -0
- diffneusim/engine/x14cpu.py +163 -0
- diffneusim/env/__init__.py +0 -0
- diffneusim/env/absent.py +20 -0
- diffneusim/env/cpu14.py +105 -0
- diffneusim/env/e0loop14.py +224 -0
- diffneusim/env/env14.py +568 -0
- diffneusim/env/kin_contact14.py +193 -0
- diffneusim/env/mimic_sites_x14.json +366 -0
- diffneusim/env/old_count.py +78 -0
- diffneusim/env/rew14.py +114 -0
- diffneusim/env/rew14_hook.py +105 -0
- diffneusim/g1/__init__.py +1 -0
- diffneusim/g1/arm_a2.py +165 -0
- diffneusim/g1/arm_a3.py +576 -0
- diffneusim/g1/read_a3.py +79 -0
- diffneusim/g1/rg1_read.py +89 -0
- diffneusim/model/__init__.py +66 -0
- diffneusim/model/case.py +17 -0
- diffneusim/model/dnmodel.py +79 -0
- diffneusim/model/fuse_fixed.py +281 -0
- diffneusim/model/monitor.py +834 -0
- diffneusim/models/BODIES.toml +48 -0
- diffneusim/models/MANIFEST.toml +979 -0
- diffneusim/models/cases/G290/case.bin +0 -0
- diffneusim/models/cases/G290/case.json +1 -0
- diffneusim/models/cases/G356-SRC/case.bin +0 -0
- diffneusim/models/cases/G356-SRC/case.json +1 -0
- diffneusim/models/cases/G416/case.bin +0 -0
- diffneusim/models/cases/G416/case.json +1 -0
- diffneusim/models/cases/M290C-SRC/case.bin +0 -0
- diffneusim/models/cases/M290C-SRC/case.json +1 -0
- diffneusim/models/cases/M290R-SRC/case.bin +0 -0
- diffneusim/models/cases/M290R-SRC/case.json +1 -0
- diffneusim/models/cases/M356C-SRC/case.bin +0 -0
- diffneusim/models/cases/M356C-SRC/case.json +1 -0
- diffneusim/models/cases/M356R-SRC/case.bin +0 -0
- diffneusim/models/cases/M356R-SRC/case.json +1 -0
- diffneusim/models/cases/M416C-SRC/case.bin +0 -0
- diffneusim/models/cases/M416C-SRC/case.json +1 -0
- diffneusim/models/derived/d16_expanded_62f77a4bb16b1e67_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_expanded_a1e8b196b2cd7b3c_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_soft_law_019e20820f8633b9_mmfloor.json +7844 -0
- diffneusim/models/derived/d16_soft_law_62f77a4bb16b1e67_mmfloor.json +16855 -0
- diffneusim/models/derived/d16_soft_law_77dbb7213f26e821_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsd05_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsdef_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsmjd_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_a1e8b196b2cd7b3c_mmfloor_rampsb3l_n6t12.json +16894 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor.json +12655 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor_rampsb3l_n6t12.json +12700 -0
- diffneusim/models/derived/unitree_g1_soft_law.json +15580 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +28913 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +29202 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +46970 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +38570 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +38923 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_meshes/1mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2distph.stl +0 -0
- diffneusim/models/fullbody_meshes/2mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2midph.stl +0 -0
- diffneusim/models/fullbody_meshes/2proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/3distph.stl +0 -0
- diffneusim/models/fullbody_meshes/3mc.stl +0 -0
- diffneusim/models/fullbody_meshes/3midph.stl +0 -0
- diffneusim/models/fullbody_meshes/3proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/4distph.stl +0 -0
- diffneusim/models/fullbody_meshes/4mc.stl +0 -0
- diffneusim/models/fullbody_meshes/4midph.stl +0 -0
- diffneusim/models/fullbody_meshes/4proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/5distph.stl +0 -0
- diffneusim/models/fullbody_meshes/5mc.stl +0 -0
- diffneusim/models/fullbody_meshes/5midph.stl +0 -0
- diffneusim/models/fullbody_meshes/5proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/NOTICE +2 -0
- diffneusim/models/fullbody_meshes/capitate.stl +0 -0
- diffneusim/models/fullbody_meshes/clavicle.stl +0 -0
- diffneusim/models/fullbody_meshes/hamate.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_cervical.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_jaw.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_skull.stl +0 -0
- diffneusim/models/fullbody_meshes/humerus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/l_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/l_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/l_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/l_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar1.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar2.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar3.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar4.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar5.stl +0 -0
- diffneusim/models/fullbody_meshes/lunate.stl +0 -0
- diffneusim/models/fullbody_meshes/pisiform.stl +0 -0
- diffneusim/models/fullbody_meshes/r_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/r_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/r_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/r_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/r_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/r_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/radius.stl +0 -0
- diffneusim/models/fullbody_meshes/sacrum.stl +0 -0
- diffneusim/models/fullbody_meshes/scaphoid.stl +0 -0
- diffneusim/models/fullbody_meshes/scapula.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic10_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic11_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic12_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic1_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic2_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic3_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic4_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic5_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic6_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic7_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic8_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic9_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thorax.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbdist.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbprox.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezium.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezoid.stl +0 -0
- diffneusim/models/fullbody_meshes/triquetrum.stl +0 -0
- diffneusim/models/fullbody_meshes/ulna.stl +0 -0
- diffneusim/models/source/myo_fullbody/UPSTREAM.md +91 -0
- diffneusim/models/source/myoleg/UPSTREAM.md +52 -0
- diffneusim/models/source/unitree_g1/LICENSE.mjlab +202 -0
- diffneusim/models/source/unitree_g1/UPSTREAM.md +38 -0
- diffneusim/models/source/unitree_g1/assets/head_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/logo_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis_contour_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/torso_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_roll_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_yaw_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/dump_mjlab_reference.py +30 -0
- diffneusim/models/source/unitree_g1/g1.xml +308 -0
- diffneusim/models/source/unitree_g1/g1_constants.py +298 -0
- diffneusim/models/source/unitree_g1/mjlab_compiled_reference.json +857 -0
- diffneusim/models/unitree_g1.dnmodel +4393 -0
- diffneusim/models/unitree_g1_selfcol.dnmodel +20824 -0
- diffneusim/rl/__init__.py +2 -0
- diffneusim/rl/dynsyn_layer.py +146 -0
- diffneusim/rl/footstep_plan.py +337 -0
- diffneusim/rl/g1_bm_env.py +572 -0
- diffneusim/rl/g1_bm_eval.py +168 -0
- diffneusim/rl/g1_bm_fused.py +275 -0
- diffneusim/rl/g1_bm_ppo.py +622 -0
- diffneusim/rl/g1_bm_sapo.py +551 -0
- diffneusim/rl/g1_ppo.py +395 -0
- diffneusim/rl/g1_sapo_soft.py +240 -0
- diffneusim/rl/g1_soft_env.py +452 -0
- diffneusim/rl/g1_soft_grad.py +145 -0
- diffneusim/rl/geyer_curves_torch.py +108 -0
- diffneusim/rl/gpu_fullbody_vec_env.py +1241 -0
- diffneusim/rl/imitation.py +2027 -0
- diffneusim/rl/imitation_reward_v2.py +248 -0
- diffneusim/rl/imitation_reward_v3.py +349 -0
- diffneusim/rl/latent_task.py +175 -0
- diffneusim/rl/llc_reward.py +316 -0
- diffneusim/rl/millard_curves_torch.py +154 -0
- diffneusim/rl/mirror_symmetry.py +212 -0
- diffneusim/rl/model_path.py +35 -0
- diffneusim/rl/mvae_recon.py +123 -0
- diffneusim/rl/nets_shac.py +599 -0
- diffneusim/rl/reset_pool.py +154 -0
- diffneusim/rl/sapo_capture.py +873 -0
- diffneusim/rl/sapo_vec.py +1051 -0
- diffneusim/rl/shac_vec.py +346 -0
- diffneusim/rl/state_prior.py +151 -0
- diffneusim/rl/step_library.py +105 -0
- diffneusim/rl/task_walk_env.py +1793 -0
- diffneusim/rl/task_walk_reward.py +3300 -0
- diffneusim/run.py +23 -0
- diffneusim/run_env.py +46 -0
- diffneusim/tasks/__init__.py +147 -0
- diffneusim/tasks/legacy_names.py +63 -0
- diffneusim/tasks/paths.py +79 -0
- diffneusim/tasks/settings.py +202 -0
- diffneusim/third_party/instantmimic_947430ee/LICENSE +202 -0
- diffneusim/third_party/instantmimic_947430ee/NOTICE +19 -0
- diffneusim/third_party/instantmimic_947430ee/README.md +31 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/benchmark_protocol.py +106 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/metrics.py +214 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/reference.py +513 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/motion/quaternion.py +193 -0
- diffneusim/train/__init__.py +0 -0
- diffneusim/train/eval_ckpt.py +239 -0
- diffneusim/train/eval_mimic.py +133 -0
- diffneusim/train/gait_report.py +203 -0
- diffneusim/train/gcot_chain.py +51 -0
- diffneusim/train/levers.py +135 -0
- diffneusim/train/masked_reset.py +314 -0
- diffneusim/train/rl_algorithm_suite.py +917 -0
- diffneusim/train/train14.py +240 -0
- diffneusim/train/train_tw14.py +674 -0
- diffneusim/viz/__init__.py +5 -0
- diffneusim/viz/__main__.py +41 -0
- diffneusim/viz/camera.py +115 -0
- diffneusim/viz/dnrec.py +118 -0
- diffneusim/viz/dnrec_io.py +686 -0
- diffneusim/viz/hud.py +565 -0
- diffneusim/viz/meshes.py +458 -0
- diffneusim/viz/play.py +237 -0
- diffneusim/viz/record.py +74 -0
- diffneusim/viz/render.py +1402 -0
- diffneusim/viz/renderer.py +268 -0
- diffneusim/viz/rl_env_render.py +635 -0
- diffneusim/viz/snapshot.py +54 -0
- diffneusim/viz/strobe.py +124 -0
- diffneusim/viz/to_mp4.py +58 -0
- diffneusim/viz/ui.py +481 -0
- diffneusim/viz/viewer.py +2086 -0
- diffneusim-1.0.0.dist-info/METADATA +226 -0
- diffneusim-1.0.0.dist-info/RECORD +682 -0
- diffneusim-1.0.0.dist-info/WHEEL +5 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSE +201 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-ARMS-hand-wrist-4.3.txt +20 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-MoBL-ARMS.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/CC-BY-3.0-OpenSim-geometry.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Christophy2012-lumbarspine.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lai2017-model-high-flex.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lee2015-hand_muscle.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Rajagopal2016-full_body.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Uhlrich2022-fbmodpassivecal.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/NOTICE +274 -0
- diffneusim-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"""InstantMimic's G1 BeyondMimic evaluate protocol on our engine's port of the side-kick task (arm A2).
|
|
2
|
+
|
|
3
|
+
Source: InstantMimic 947430ee, `src/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/evaluate.py`
|
|
4
|
+
(`evaluate_checkpoint`). The loop below is theirs with our env's interface (docs/training/campaigns/g1/a2-env-interface.md):
|
|
5
|
+
- reset every world (the caller seeds right before, as their `env.reset(seed=seed)` does: see `set_seed`);
|
|
6
|
+
- per step: `snapshot_benchmark_reference()` BEFORE `env.step`, the mean action, `env.step`, the reward summed over the
|
|
7
|
+
worlds still active before the step, `get_benchmark_robot_state()` AFTER the step, then `accumulator.update` and
|
|
8
|
+
`accumulator.mark_dones`;
|
|
9
|
+
- until every world's episode is done (its first terminated or truncated); a RuntimeError if any is unfinished at
|
|
10
|
+
`max_steps` (theirs: `env.max_episode_length`, 500 at 10 s / 0.02 s).
|
|
11
|
+
The accumulator, the metrics, the success definition (time-out without termination) and the aggregation (per-episode temporal
|
|
12
|
+
mean, then the mean over episodes) are their vendored `metrics.py`, unchanged; the thresholds are their vendored
|
|
13
|
+
`benchmark_protocol.py` (third_party/instantmimic_947430ee).
|
|
14
|
+
|
|
15
|
+
As in theirs, `get_benchmark_robot_state()` is read after `step`, so on a world's done step (and on a motion-end rewrite step)
|
|
16
|
+
it scores the state the env holds after its internal reset or rewrite, against the reference snapshotted before the step. Their
|
|
17
|
+
env runs forward kinematics inside `_reset_idx` (beyondmimic_tracking_env.py:863-885), so the env must return that same
|
|
18
|
+
post-reset state.
|
|
19
|
+
|
|
20
|
+
`act_mean(actor_obs_raw) -> [n, 29]` is the agent's mean action on the env's raw actor observation (the agent normalises
|
|
21
|
+
inside). The batch CLI is tools/g1_seconds/a2_eval_batch.py; `score_run` below is its body."""
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
import hashlib
|
|
25
|
+
import json
|
|
26
|
+
import pathlib
|
|
27
|
+
import random
|
|
28
|
+
import re
|
|
29
|
+
import sys
|
|
30
|
+
import time
|
|
31
|
+
|
|
32
|
+
import numpy as np
|
|
33
|
+
import torch
|
|
34
|
+
|
|
35
|
+
_V = pathlib.Path(__file__).resolve().parents[1] / "third_party" / "instantmimic_947430ee"
|
|
36
|
+
sys.path.insert(0, str(_V))
|
|
37
|
+
from instantmimic.envs.unitree_g1.tasks.beyondmimic_tracking import benchmark_protocol as _P # noqa: E402
|
|
38
|
+
from instantmimic.envs.unitree_g1.tasks.beyondmimic_tracking import metrics as _M # noqa: E402
|
|
39
|
+
|
|
40
|
+
sys.path.remove(str(_V))
|
|
41
|
+
assert pathlib.Path(_M.__file__).resolve().is_relative_to(_V.resolve()), _M.__file__
|
|
42
|
+
assert pathlib.Path(_P.__file__).resolve().is_relative_to(_V.resolve()), _P.__file__
|
|
43
|
+
|
|
44
|
+
BeyondMimicBenchmarkAccumulator = _M.BeyondMimicBenchmarkAccumulator
|
|
45
|
+
BenchmarkReference = _M.BenchmarkReference
|
|
46
|
+
EVALUATION_EPISODES = _P.EVALUATION_EPISODES
|
|
47
|
+
meets_quality_threshold = _P.meets_quality_threshold
|
|
48
|
+
|
|
49
|
+
TRACKED_BODIES = 14
|
|
50
|
+
ROBOT_KEYS = ("body_position_world", "body_quaternion_world", "joint_velocity")
|
|
51
|
+
CHECKPOINT_RE = re.compile(r"^checkpoint_iter_(\d+)\.pt$")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def set_seed(seed: int) -> None:
|
|
55
|
+
"""Their `rl.runtime.set_seed` (random, numpy, torch, every CUDA device); their `env.reset(seed=)` seeds numpy and torch
|
|
56
|
+
the same way (direct_rl_env.py:3264-3284). Our env must draw its reset perturbation and observation noise from these
|
|
57
|
+
global streams for a re-seed to take effect; `score_run` checks that it did."""
|
|
58
|
+
random.seed(seed)
|
|
59
|
+
np.random.seed(seed)
|
|
60
|
+
torch.manual_seed(seed)
|
|
61
|
+
if torch.cuda.is_available():
|
|
62
|
+
torch.cuda.manual_seed_all(seed)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _check_reference(ref: dict, n: int, act_dim: int) -> BenchmarkReference:
|
|
66
|
+
shapes = dict(body_position_world=(n, TRACKED_BODIES, 3), body_position_relative_world=(n, TRACKED_BODIES, 3),
|
|
67
|
+
body_quaternion_relative_world=(n, TRACKED_BODIES, 4), joint_velocity=(n, act_dim))
|
|
68
|
+
assert set(ref) == set(shapes), sorted(ref)
|
|
69
|
+
for k, s in shapes.items():
|
|
70
|
+
assert tuple(ref[k].shape) == s, (k, tuple(ref[k].shape), s)
|
|
71
|
+
# Their snapshot clones (beyondmimic_tracking_env.py:904-915); cloning here keeps it pre-step whatever the env returns.
|
|
72
|
+
return BenchmarkReference(**{k: v.clone() for k, v in ref.items()})
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _check_robot(robot: dict, n: int, act_dim: int) -> dict:
|
|
76
|
+
shapes = dict(body_position_world=(n, TRACKED_BODIES, 3), body_quaternion_world=(n, TRACKED_BODIES, 4),
|
|
77
|
+
joint_velocity=(n, act_dim))
|
|
78
|
+
assert set(robot) == set(shapes), sorted(robot)
|
|
79
|
+
for k, s in shapes.items():
|
|
80
|
+
assert tuple(robot[k].shape) == s, (k, tuple(robot[k].shape), s)
|
|
81
|
+
return robot
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@torch.no_grad()
|
|
85
|
+
def evaluate(env, act_mean, *, max_steps: int = 500) -> dict:
|
|
86
|
+
"""Their evaluate loop on an evaluate-mode env (1,024 worlds, sampling "start", pushes off, observation and reset noise on,
|
|
87
|
+
the run's DR). Returns their finalize() metrics (success_rate, mpkpe, r_mpkpe, joint_vel_error, ee_pos_error,
|
|
88
|
+
ee_ori_error) plus their episode_reward_mean, steps, meets_quality_threshold and protocol name, and the sha256 of the
|
|
89
|
+
reset actor observation (to check a re-seed across checkpoints)."""
|
|
90
|
+
for name in ("snapshot_benchmark_reference", "get_benchmark_robot_state", "benchmark_end_effector_indices"):
|
|
91
|
+
assert hasattr(env, name), f"env does not implement the benchmark API: {name}"
|
|
92
|
+
assert isinstance(max_steps, int) and max_steps > 0, max_steps
|
|
93
|
+
n, act_dim = int(env.n), int(env.act_dim)
|
|
94
|
+
obs = env.reset_all()
|
|
95
|
+
actor = obs["actor"]
|
|
96
|
+
assert tuple(actor.shape) == (n, env.actor_obs_dim), tuple(actor.shape)
|
|
97
|
+
reset_sha = hashlib.sha256(actor.detach().cpu().contiguous().numpy().tobytes()).hexdigest()
|
|
98
|
+
dev = actor.device
|
|
99
|
+
accumulator = BeyondMimicBenchmarkAccumulator(num_envs=n, end_effector_indices=env.benchmark_end_effector_indices,
|
|
100
|
+
device=dev)
|
|
101
|
+
episode_returns = torch.zeros(n, device=dev) # theirs: the default dtype (float32)
|
|
102
|
+
steps = 0
|
|
103
|
+
while not bool(torch.all(accumulator.done).item()):
|
|
104
|
+
if steps >= max_steps:
|
|
105
|
+
unfinished = int(torch.count_nonzero(~accumulator.done).item())
|
|
106
|
+
raise RuntimeError(f"{unfinished} episodes did not finish within {max_steps} steps")
|
|
107
|
+
reference = _check_reference(env.snapshot_benchmark_reference(), n, act_dim)
|
|
108
|
+
actions = act_mean(actor)
|
|
109
|
+
assert tuple(actions.shape) == (n, act_dim) and actions.dtype == actor.dtype, (tuple(actions.shape), actions.dtype)
|
|
110
|
+
active = ~accumulator.done
|
|
111
|
+
out = env.step(actions)
|
|
112
|
+
assert out["terminated"].dtype == torch.bool and out["truncated"].dtype == torch.bool
|
|
113
|
+
assert tuple(out["reward"].shape) == (n,), tuple(out["reward"].shape)
|
|
114
|
+
episode_returns.add_(out["reward"].reshape(-1) * active)
|
|
115
|
+
robot = _check_robot(env.get_benchmark_robot_state(), n, act_dim)
|
|
116
|
+
accumulator.update(reference=reference, robot_body_position_world=robot["body_position_world"],
|
|
117
|
+
robot_body_quaternion_world=robot["body_quaternion_world"],
|
|
118
|
+
robot_joint_velocity=robot["joint_velocity"])
|
|
119
|
+
accumulator.mark_dones(terminated=out["terminated"], truncated=out["truncated"])
|
|
120
|
+
actor = out["actor"]
|
|
121
|
+
steps += 1
|
|
122
|
+
metrics = accumulator.finalize()
|
|
123
|
+
return dict(**metrics,
|
|
124
|
+
episode_reward_mean=float(episode_returns.mean().item()),
|
|
125
|
+
meets_quality_threshold=meets_quality_threshold(metrics),
|
|
126
|
+
steps=steps,
|
|
127
|
+
protocol=("mjlab-nightly-side-kick" if n == EVALUATION_EPISODES else "side-kick-custom-episode-count"),
|
|
128
|
+
evaluation_episodes=n,
|
|
129
|
+
reset_actor_obs_sha256=reset_sha)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def checkpoints(run_dir) -> list[tuple[int, pathlib.Path]]:
|
|
133
|
+
"""Every `checkpoint_iter_<N>.pt` directly in `run_dir`, sorted by N."""
|
|
134
|
+
found = []
|
|
135
|
+
for p in pathlib.Path(run_dir).iterdir():
|
|
136
|
+
m = CHECKPOINT_RE.match(p.name)
|
|
137
|
+
if m:
|
|
138
|
+
found.append((int(m.group(1)), p))
|
|
139
|
+
assert found, f"no checkpoint_iter_<N>.pt in {run_dir}"
|
|
140
|
+
return sorted(found)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def score_run(env, run_dir, load_act_mean, *, seed: int, out_path, max_steps: int = 500) -> list[dict]:
|
|
144
|
+
"""Score every checkpoint of a run with one env built once: per checkpoint, load it (`load_act_mean(path, env)` ->
|
|
145
|
+
`act_mean`), seed, then `evaluate`. Their batch builds a fresh env per checkpoint with the same seed (gym.make, then
|
|
146
|
+
`env.reset(seed=seed)` after the agent is built), so every checkpoint starts from the same reset draw; the reset actor
|
|
147
|
+
observation's sha256 must therefore be the same for every checkpoint, which is asserted (it fails if the env draws its
|
|
148
|
+
reset noise from a private generator that `set_seed` does not reach). Writes one JSON line per checkpoint."""
|
|
149
|
+
rows, first_sha = [], None
|
|
150
|
+
out_path = pathlib.Path(out_path)
|
|
151
|
+
with out_path.open("w") as f:
|
|
152
|
+
for it, path in checkpoints(run_dir):
|
|
153
|
+
act_mean = load_act_mean(path, env)
|
|
154
|
+
set_seed(seed)
|
|
155
|
+
t0 = time.monotonic()
|
|
156
|
+
r = evaluate(env, act_mean, max_steps=max_steps)
|
|
157
|
+
if first_sha is None:
|
|
158
|
+
first_sha = r["reset_actor_obs_sha256"]
|
|
159
|
+
assert r["reset_actor_obs_sha256"] == first_sha, (
|
|
160
|
+
f"checkpoint {path.name}: the reset observation differs from the first checkpoint's after set_seed({seed}); "
|
|
161
|
+
"the env's reset or observation noise does not follow the global seed, so checkpoints are not scored on the "
|
|
162
|
+
"same draw as their evaluate does")
|
|
163
|
+
row = dict(iteration=it, checkpoint=path.name, seed=seed, eval_wall_s=round(time.monotonic() - t0, 2), **r)
|
|
164
|
+
f.write(json.dumps(row) + "\n")
|
|
165
|
+
f.flush()
|
|
166
|
+
rows.append(row)
|
|
167
|
+
print(f"iter {it}: mpkpe {r['mpkpe']:.4f} success {r['success_rate']:.4f} ({row['eval_wall_s']} s)", flush=True)
|
|
168
|
+
return rows
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"""BMTrack's compiled path (tools/g1_seconds/FUSE_PLAN.md; C, 11-11; unified into BMTrack the same day, the review / the design brief: one env, the
|
|
2
|
+
speed-up in the shared path): BMTrack(..., compile=True) runs BMTrack.step itself with its post-engine half (_post) as ONE torch.compile
|
|
3
|
+
region (fullgraph=True, dynamic=False), the engine's StepFn (_engine_step) left outside it. This module holds the machinery only.
|
|
4
|
+
|
|
5
|
+
Nothing of line 23's env logic or of the vendored InstantMimic tree is written twice:
|
|
6
|
+
- the vendored quaternion.py and reference.py are loaded from their unchanged files into fresh modules, with the quaternion module's
|
|
7
|
+
`@torch.jit.script` decorator lines removed in memory (Dynamo cannot trace a ScriptFunction), and reference.py's imports resolved to
|
|
8
|
+
that plain module;
|
|
9
|
+
- compile=True re-classes the env to a GENERATED subclass (compiled_class) whose methods are its classes' own function objects
|
|
10
|
+
re-created over plain-module copies of their modules' globals (the same code objects, so the same source lines); BMTrack's eager
|
|
11
|
+
path keeps the scripted modules (bitwise the pre-unification env: tools/g1_seconds/unify_eager_gate.py);
|
|
12
|
+
- the backend's FK (BMTrack._fk: backend.frames, a ctypes / CUDA-extension call) is a torch.library custom op with a fake
|
|
13
|
+
implementation in the generated class, so it does not break the graph; it reads detached state, so it has no backward.
|
|
14
|
+
Randoms: an RNG DRAW TAPE. The step's draws (BMTrack._rand, every env draw) are made eagerly, in the eager step's order, shapes and
|
|
15
|
+
dtype, right before the compiled call and passed in as a list; BMTrack._rand pops them in order inside, so the compiled graph holds no
|
|
16
|
+
random op (audit=True records any that remain). The sequence is recorded once per Python-level branch from one eager post step (state
|
|
17
|
+
and RNG put back) and checked per draw; each step asserts the tape was consumed exactly. Inductor settings: fallback_random kept as a
|
|
18
|
+
belt, triton.cudagraphs off (the caller's own CUDA-graph capture records the compiled kernels).
|
|
19
|
+
env = BMTrack(backend, motion, lawmap, n, ..., compile=True) # plain_eager=True: the plain-module eager path (the gates' middle arm)
|
|
20
|
+
env = BMTrackFused(backend, motion, lawmap, n, ..., compile=True) # the former constructor, kept for the gates and tools"""
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import sys
|
|
24
|
+
import types
|
|
25
|
+
|
|
26
|
+
import torch
|
|
27
|
+
import torch._dynamo
|
|
28
|
+
import torch._inductor.config as IC
|
|
29
|
+
|
|
30
|
+
from . import g1_bm_env as B
|
|
31
|
+
from . import g1_soft_env as G
|
|
32
|
+
from . import g1_soft_grad as D
|
|
33
|
+
|
|
34
|
+
IC.fallback_random = True
|
|
35
|
+
IC.triton.cudagraphs = False
|
|
36
|
+
|
|
37
|
+
QSRC = B.V / "instantmimic" / "motion" / "quaternion.py"
|
|
38
|
+
RSRC = B.V / "instantmimic" / "envs" / "unitree_g1" / "tasks" / "beyondmimic_tracking" / "reference.py"
|
|
39
|
+
QNAME, RNAME = "instantmimic.motion.quaternion", "instantmimic.envs.unitree_g1.tasks.beyondmimic_tracking.reference"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _load(name, path, src):
|
|
43
|
+
mod = types.ModuleType(name)
|
|
44
|
+
mod.__file__ = str(path)
|
|
45
|
+
sys.modules[name] = mod # dataclasses resolve their module by name while the class is built
|
|
46
|
+
exec(compile(src, str(path), "exec"), mod.__dict__)
|
|
47
|
+
return mod
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def plain_modules():
|
|
51
|
+
"""(Qp, Rp): the vendored quaternion / reference modules from their unchanged files, the quaternion module without TorchScript"""
|
|
52
|
+
qsrc = QSRC.read_text()
|
|
53
|
+
lines = qsrc.splitlines(True)
|
|
54
|
+
drop = [i for i, ln in enumerate(lines) if ln.strip() == "@torch.jit.script"]
|
|
55
|
+
assert len(drop) == 6, f"the vendored quaternion module's TorchScript decorators changed: {len(drop)}"
|
|
56
|
+
Qp = _load("g1fuse_plain.quaternion", QSRC, "".join(ln for i, ln in enumerate(lines) if i not in drop))
|
|
57
|
+
keep = sys.modules.get(QNAME)
|
|
58
|
+
sys.modules[QNAME] = Qp # reference.py's `from instantmimic.motion.quaternion import ...` binds the plain functions
|
|
59
|
+
try:
|
|
60
|
+
Rp = _load("g1fuse_plain.reference", RSRC, RSRC.read_text())
|
|
61
|
+
finally:
|
|
62
|
+
if keep is not None:
|
|
63
|
+
sys.modules[QNAME] = keep
|
|
64
|
+
else:
|
|
65
|
+
del sys.modules[QNAME]
|
|
66
|
+
assert sys.modules[QNAME] is B.Q, "the scripted quaternion module was not restored"
|
|
67
|
+
for f in ("quat_mul", "quat_conj", "quat_to_scaled_axis_angle", "scaled_axis_angle_to_quat", "copysign", "get_euler_xyz"):
|
|
68
|
+
assert isinstance(getattr(B.Q, f), torch.jit.ScriptFunction) and isinstance(getattr(Qp, f), types.FunctionType), f
|
|
69
|
+
return Qp, Rp
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
QP, RP = plain_modules()
|
|
73
|
+
|
|
74
|
+
# the backend's FK as an opaque op
|
|
75
|
+
_BE, _NB = {}, {}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@torch.library.custom_op("g1fuse::frames", mutates_args=())
|
|
79
|
+
def frames_op(qpos: torch.Tensor, qvel: torch.Tensor, key: int) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
|
|
80
|
+
# GpuLaw.frames hands raw device pointers to the extension's FK kernel, which assumes contiguous rows; inside a compiled graph inductor
|
|
81
|
+
# may pass strided buffers (11-11: the GPU GG0 failed with post-reset observations off by up to 21 while the CPU path, which goes through
|
|
82
|
+
# numpy and honours strides, matched to 1e-13). Contiguous copies, asserted, before the call.
|
|
83
|
+
qpos, qvel = qpos.contiguous(), qvel.contiguous()
|
|
84
|
+
assert qpos.is_contiguous() and qvel.is_contiguous(), (qpos.stride(), qvel.stride())
|
|
85
|
+
fr = _BE[key].frames(qpos, qvel)
|
|
86
|
+
return tuple(fr[k].clone() for k in ("xpos", "xquat", "xvel", "xangvel"))
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@frames_op.register_fake
|
|
90
|
+
def _frames_fake(qpos, qvel, key):
|
|
91
|
+
n, nb = qpos.shape[0], _NB[key]
|
|
92
|
+
dt = torch.float32 if _BE[key].__class__.__name__ == "GpuLaw" else qpos.dtype
|
|
93
|
+
return tuple(torch.empty(n, nb, w, dtype=dt, device=qpos.device) for w in (3, 4, 3, 3))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
RAND_OPS = ("rand", "rand_like", "randn", "randn_like", "randint", "randint_like", "bernoulli", "normal", "uniform", "multinomial",
|
|
97
|
+
"randperm", "exponential", "geometric", "cauchy", "log_normal", "poisson")
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def _audit_backend(store):
|
|
101
|
+
"""inductor, after recording every random op the captured FX graph still calls (the tape's audit: there must be none)"""
|
|
102
|
+
from torch._inductor.compile_fx import compile_fx
|
|
103
|
+
|
|
104
|
+
def backend(gm, example_inputs):
|
|
105
|
+
for node in gm.graph.nodes:
|
|
106
|
+
if node.op in ("call_function", "call_method"):
|
|
107
|
+
name = getattr(node.target, "__name__", str(node.target))
|
|
108
|
+
if any(name == r or name.startswith(r + ".") or name.endswith("." + r) or name == r + "_" for r in RAND_OPS):
|
|
109
|
+
store.append(name)
|
|
110
|
+
store.append(f"<graph of {sum(1 for n in gm.graph.nodes if n.op in ('call_function', 'call_method'))} calls>")
|
|
111
|
+
return compile_fx(gm, example_inputs)
|
|
112
|
+
return backend
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# ---------------------------------------------------------------------------------------------------------------------------------------
|
|
116
|
+
# The compiled path of BMTrack (the unification, 11-11): BMTrack(compile=True) re-classes the instance to a GENERATED subclass whose methods
|
|
117
|
+
# are its own classes' function objects (BMTrack's and any subclass's: the same code objects, so the same source lines) re-created over
|
|
118
|
+
# plain-module copies of their modules' globals (R and Q the non-TorchScript modules; Dynamo resolves a function's globals through its
|
|
119
|
+
# __name__ in sys.modules, so each copy is a module of its own). Nothing is written by hand twice: BMTrack.step / _engine_step / _post
|
|
120
|
+
# are the one step, the RNG draw tape lives in BMTrack._rand, and the FK goes through BMTrack._fk, which the generated class points at the
|
|
121
|
+
# opaque custom op. A subclass method using zero-arg super() is refused (super() would reach the TorchScript-bound parent inside the
|
|
122
|
+
# compiled region); such an env stays eager.
|
|
123
|
+
def _plain_module(mod):
|
|
124
|
+
name = "diffneusim.rl.g1_bm_env_plain" if mod is B else f"{mod.__name__}_plain"
|
|
125
|
+
P = sys.modules.get(name)
|
|
126
|
+
if P is not None:
|
|
127
|
+
return P
|
|
128
|
+
P = types.ModuleType(name)
|
|
129
|
+
P.__dict__.update({k: v for k, v in vars(mod).items() if k not in ("__name__", "__spec__", "__loader__", "__package__")})
|
|
130
|
+
for k, v in list(P.__dict__.items()):
|
|
131
|
+
if v is B.Q:
|
|
132
|
+
P.__dict__[k] = QP
|
|
133
|
+
elif v is B.R:
|
|
134
|
+
P.__dict__[k] = RP
|
|
135
|
+
P.__dict__["__package__"] = getattr(mod, "__package__", None)
|
|
136
|
+
sys.modules[name] = P
|
|
137
|
+
return P
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
_ENV = _plain_module(B) # g1_bm_env's plain copy (fuse_gpu_gate patches its PUSH_VEL beside g1_bm_env's)
|
|
141
|
+
assert _ENV.Q is QP and _ENV.R is RP
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _fk_op(self, qpos, qvel):
|
|
145
|
+
xp, xq, xv, xa = frames_op(qpos, qvel, self._key)
|
|
146
|
+
return dict(xpos=xp, xquat=xq, xvel=xv, xangvel=xa)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def _record_spec(self, args):
|
|
150
|
+
"""the step's draw sequence (shapes, in order), from ONE eager post step on these engine outputs, with the env's state and the RNG
|
|
151
|
+
put back afterwards (snapshot / restore, the CPU and CUDA generators), so the step then runs as if this never happened"""
|
|
152
|
+
cuda = str(self.dev).startswith("cuda")
|
|
153
|
+
snap, rc, rg = self.snapshot(), torch.get_rng_state(), (torch.cuda.get_rng_state() if cuda else None)
|
|
154
|
+
self._rec = []
|
|
155
|
+
with torch.no_grad():
|
|
156
|
+
self._post(*[x.detach() for x in args])
|
|
157
|
+
spec, self._rec = list(self._rec), None
|
|
158
|
+
self.restore(snap)
|
|
159
|
+
torch.set_rng_state(rc)
|
|
160
|
+
if cuda:
|
|
161
|
+
torch.cuda.set_rng_state(rg)
|
|
162
|
+
return spec
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def _draw_tape(self):
|
|
166
|
+
"""the step's draws made NOW, eagerly, in the recorded order, shapes and dtype: torch.rand exactly as the eager step calls it"""
|
|
167
|
+
return [torch.rand(s, device=self.dev, dtype=self.dt) for s in self._spec]
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
_CLASSES = {}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def compiled_class(cls):
|
|
174
|
+
C = _CLASSES.get(cls)
|
|
175
|
+
if C is not None:
|
|
176
|
+
return C
|
|
177
|
+
body = dict(_fk=_fk_op, _record_spec=_record_spec, draw_tape=_draw_tape)
|
|
178
|
+
for klass in cls.__mro__:
|
|
179
|
+
if not (isinstance(klass, type) and issubclass(klass, B.BMTrack)):
|
|
180
|
+
continue
|
|
181
|
+
P = _plain_module(sys.modules[klass.__module__])
|
|
182
|
+
for name, fn in vars(klass).items():
|
|
183
|
+
if name in body or name == "__init__" or not isinstance(fn, types.FunctionType):
|
|
184
|
+
continue
|
|
185
|
+
assert klass is B.BMTrack or "__class__" not in fn.__code__.co_freevars, \
|
|
186
|
+
(f"{klass.__name__}.{name} uses zero-arg super(): in the compiled region it would reach BMTrack's TorchScript-bound "
|
|
187
|
+
f"method; keep this env eager (compile=False)")
|
|
188
|
+
nf = types.FunctionType(fn.__code__, P.__dict__, fn.__name__, fn.__defaults__, fn.__closure__)
|
|
189
|
+
nf.__kwdefaults__, nf.__qualname__, nf.__doc__ = fn.__kwdefaults__, f"{cls.__name__}Compiled.{name}", fn.__doc__
|
|
190
|
+
body[name] = nf
|
|
191
|
+
C = type(f"{cls.__name__}Compiled", (cls,), body)
|
|
192
|
+
_CLASSES[cls] = C
|
|
193
|
+
return C
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def compile_env(env, audit=False):
|
|
197
|
+
"""BMTrack.__init__'s last act with compile=True: the generated class, the FK op's backend, and the post half compiled (or, with
|
|
198
|
+
plain_eager, the plain-module post run eagerly: the gates' middle arm)"""
|
|
199
|
+
env.__class__ = compiled_class(type(env))
|
|
200
|
+
env._key = id(env)
|
|
201
|
+
_BE[env._key] = env.be
|
|
202
|
+
_NB[env._key] = len(env.be.bodies)
|
|
203
|
+
env.graph_audit = [] # with audit=True: the random ops left in the compiled graphs (expected: none)
|
|
204
|
+
if env.plain_eager:
|
|
205
|
+
env._post_c = env._post
|
|
206
|
+
return
|
|
207
|
+
be = _audit_backend(env.graph_audit) if audit else "inductor"
|
|
208
|
+
env._post_c = torch.compile(env._post, fullgraph=True, dynamic=False, backend=be)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def post_compiled(env, args):
|
|
212
|
+
"""BMTrack.step's post half on the compiled path: the draw tape (recorded once per Python-level branch, drawn eagerly in the eager
|
|
213
|
+
step's order), the compiled call, the tape consumed exactly. plain_eager: the plain-module post, its draws inline."""
|
|
214
|
+
if env.plain_eager:
|
|
215
|
+
return env._post(*args)
|
|
216
|
+
k = bool(env.pushes and env.initial_reset_done) # the one Python-level condition on the step's draws (_apply_pushes)
|
|
217
|
+
if k not in env._specs:
|
|
218
|
+
env._specs[k] = env._record_spec(args)
|
|
219
|
+
env._spec = env._specs[k]
|
|
220
|
+
tape = env.draw_tape()
|
|
221
|
+
out = env._post_c(*args, tape)
|
|
222
|
+
assert env._ti == len(tape), ("the compiled step did not consume its tape exactly", env._ti, len(tape))
|
|
223
|
+
env._tape, env._ti = None, 0
|
|
224
|
+
return out
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def BMTrackFused(*a, compile=True, audit=False, **kw):
|
|
228
|
+
"""the former subclass's constructor, kept for the gates and tools: BMTrack on its compiled path (compile=True), or the plain-module
|
|
229
|
+
eager middle arm (compile=False). The compiled path is BMTrack.step itself since the unification."""
|
|
230
|
+
return B.BMTrack(*a, compile=True, plain_eager=not compile, audit=audit, **kw)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def warm_compile(env, H=None):
|
|
234
|
+
"""torch.compile's first calls OUTSIDE any clock (arm_a3 --fused, as capture() is kept out): one H-step differentiable window with
|
|
235
|
+
its backward on THIS env (Dynamo's compiled code is guarded per instance, and a window has more than one graph variant: the first
|
|
236
|
+
step's prev_action carries no gradient, the later steps' do), then the env put back exactly as it was (its state, its frames, its
|
|
237
|
+
sampler, the slot, initial_reset_done) and the CPU / CUDA RNG states restored. Returns the seconds it took (RAW clock, synced).
|
|
238
|
+
Inductor's deterministic mode (TORCHINDUCTOR_DETERMINISTIC=1, PREREG_F3_DETERMINISM): the env var alone holds only until the first
|
|
239
|
+
frame, because torch.use_deterministic_algorithms(mode) also writes inductor_config.deterministic = mode (torch/__init__.py) and
|
|
240
|
+
Dynamo's convert_frame restores the prior use_deterministic_algorithms after every frame. So when the mode is asked, the warm
|
|
241
|
+
compile (forward AND backward graphs, and their first runs, where reductions are autotuned) runs under
|
|
242
|
+
use_deterministic_algorithms(True, warn_only=True), and the prior setting comes back afterwards. env.compile_deterministic records
|
|
243
|
+
inductor's flag as the compile saw it."""
|
|
244
|
+
import os as _os
|
|
245
|
+
import time as _t
|
|
246
|
+
assert env.differentiable and env.compiled and env._post_c is not None, "warm_compile: a BMTrack(compile=True) training env"
|
|
247
|
+
cuda = str(env.dev).startswith("cuda")
|
|
248
|
+
sync = torch.cuda.synchronize if cuda else (lambda: None)
|
|
249
|
+
H = env.horizon if H is None else int(H)
|
|
250
|
+
snap = env.snapshot()
|
|
251
|
+
rng_cpu, rng_cuda = torch.get_rng_state(), (torch.cuda.get_rng_state() if cuda else None)
|
|
252
|
+
det = _os.environ.get("TORCHINDUCTOR_DETERMINISTIC") == "1"
|
|
253
|
+
prior = (torch.are_deterministic_algorithms_enabled(), torch.is_deterministic_algorithms_warn_only_enabled())
|
|
254
|
+
if det:
|
|
255
|
+
torch.use_deterministic_algorithms(True, warn_only=True)
|
|
256
|
+
sync(); t0 = _t.clock_gettime(_t.CLOCK_MONOTONIC_RAW)
|
|
257
|
+
env.reset_all()
|
|
258
|
+
env.detach_state()
|
|
259
|
+
xs = [torch.zeros(env.n, G.NU, device=env.dev, dtype=env.dt, requires_grad=True) for _ in range(H)]
|
|
260
|
+
L = 0.0
|
|
261
|
+
for x in xs:
|
|
262
|
+
r = env.step(x)
|
|
263
|
+
L = L + r["reward"].sum() + 1e-3 * (r["terminal_critic"].sum() + r["actor"].sum() + r["critic"].sum())
|
|
264
|
+
torch.autograd.grad(L, xs)
|
|
265
|
+
sync(); dt_ = _t.clock_gettime(_t.CLOCK_MONOTONIC_RAW) - t0
|
|
266
|
+
env.compile_deterministic = bool(IC.deterministic) # as the forward and backward compiles saw it
|
|
267
|
+
assert env.compile_deterministic == det, ("inductor's deterministic flag at the end of the warm compile", env.compile_deterministic, det)
|
|
268
|
+
if det:
|
|
269
|
+
torch.use_deterministic_algorithms(prior[0], warn_only=prior[1])
|
|
270
|
+
env.restore(snap)
|
|
271
|
+
env.slot = 0
|
|
272
|
+
torch.set_rng_state(rng_cpu)
|
|
273
|
+
if cuda:
|
|
274
|
+
torch.cuda.set_rng_state(rng_cuda)
|
|
275
|
+
return dt_
|