Some checks failed
nightly / Test against latest dependencies (py3.10) (push) Has been cancelled
nightly / Test against latest dependencies (py3.13) (push) Has been cancelled
tests / tests (3.13, locked) (push) Has been cancelled
tests / tests (3.13, unlocked) (push) Has been cancelled
tests / pyright (3.10) (push) Has been cancelled
tests / lint-format (push) Has been cancelled
tests / tests (3.10, locked) (push) Has been cancelled
tests / tests (3.11, locked) (push) Has been cancelled
tests / tests (3.12, locked) (push) Has been cancelled
tests / pyright (3.11) (push) Has been cancelled
tests / pyright (3.12) (push) Has been cancelled
tests / pyright (3.13) (push) Has been cancelled
tests / ty-check (3.10) (push) Has been cancelled
tests / ty-check (3.11) (push) Has been cancelled
tests / ty-check (3.12) (push) Has been cancelled
tests / ty-check (3.13) (push) Has been cancelled
tests / stubs (push) Has been cancelled
tests / smoke-test (push) Has been cancelled
Docker / check_paths (push) Has been cancelled
docs / build (push) Has been cancelled
Docker / build (push) Has been cancelled
Upstream: https://github.com/michaelgillett/mjlab Upstream-Commit: c19f713c415a699a79d71cd96aa13c3104a05047 Upstream-Branch: main
31 lines
716 B
Python
31 lines
716 B
Python
import tyro
|
|
|
|
from mjlab.envs import ManagerBasedRlEnvCfg
|
|
from mjlab.rl import RslRlOnPolicyRunnerCfg
|
|
from mjlab.scene import SceneCfg
|
|
from mjlab.scripts.train import TrainConfig
|
|
from mjlab.terrains import TerrainEntityCfg
|
|
|
|
|
|
def test_tyro_defaults():
|
|
"""Regression test for #677 due to incompatibilities between declared types and
|
|
default values of the env configs.
|
|
"""
|
|
tyro.cli(
|
|
TrainConfig,
|
|
default=TrainConfig(
|
|
env=ManagerBasedRlEnvCfg(
|
|
decimation=5,
|
|
scene=SceneCfg(
|
|
terrain=TerrainEntityCfg(),
|
|
),
|
|
),
|
|
agent=RslRlOnPolicyRunnerCfg(),
|
|
),
|
|
config=(
|
|
tyro.conf.AvoidSubcommands,
|
|
tyro.conf.FlagConversionOff,
|
|
),
|
|
args=[],
|
|
)
|