协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
jax-models【开发与工程】Inspect, extend, and debug DreamerV3 neural/JAX internals: Agent, RSSM, heads, optimizers, Ninjax state, sharding, and numerics.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about DreamerV3 model internals rather than command-line training recipes, environment/replay plumbing, or operations dashboards. It covers the DreamerV3 Agent, RSSM, encoder/decoder, JAX wrapper, heads/distributions, optimizer stack, Ninjax parameter/state handling, sharding setup, loss metrics, and numerical debugging.
debug, size1m, size12m, regex override blocks, RSSM dimensions, head sizes, image encoder/decoder depths).dreamerv3.agent.Agent construction, policy(), train(), report(), save(), or load() behavior.dreamerv3.rssm.RSSM, Encoder, or Decoder shapes, carries, entries, reconstruction outputs, stochastic state, or KL losses.embodied.jax.Agent, internal.setup(), sharding meshes, transform.init/apply(), Ninjax parameter names, optimizer metrics, or finite-output assertions.LayerScan state issues.Route elsewhere:
train-configure; this sub-skill only covers model-relevant config keys.embodied-dataflow.results-ops.From this sub-skill directory or from a copied skill tree:
python scripts/inspect_model_config.py defaults debug size1m
python scripts/inspect_model_config.py defaults --set jax.platform=cpu --set agent.dyn.rssm.deter=512
python scripts/inspect_model_config.py --config-file path/to/config.yaml
Expected output sections include JAX platform/dtype, RSSM dimensions and feature size, encoder/decoder sizes, head/distribution types, loss scales, rollout settings, and warnings. This script parses configs only; it does not create environments, instantiate Agent, allocate JAX devices, or run training.
defaults debug size1m for a small CPU-oriented smoke, or inspect the exact override result with scripts/inspect_model_config.py before launching.agent.dyn.rssm.deter is divisible by agent.dyn.rssm.blocks and agent.dec.simple.bspace.load(..., regex=...) subset; read references/debugging-numerics.md.jax.platform=cpu, jax.debug=True, jax.prealloc=False, and, when needed, jax.jit=False or jax.debug_nans=True.policy() finite assertions and training metrics (loss/*, opt/grad_norm, dyn_ent, rep_ent, adv*, ent/*) to locate the component.dreamerv3.agent.Agent(obs_space, act_space, config) returns the embodied.jax.Agent wrapper because the base class intercepts construction. The wrapped model is available as agent.model on the returned object.(enc_carry, dyn_carry, dec_carry, prevact). init_train() and init_report() use the same carry contract as init_policy().consec, stepid, and optional replay-context entries), plus a JAX seed inserted by embodied.jax.Agent.stream() before train()/report().deter, stoch, and logit. The tensor feature used by heads concatenates deter and flattened stoch.embodied.jax.outs.Output objects or dictionaries of them. Use .pred(), .loss(target), .sample(seed), .logp(event), .entropy(), and .kl(other) according to references/jax-api-reference.md.LayerScan apply behavior from the repo test suite is distilled into references/debugging-numerics.md.defaults debug size1m with scripts/inspect_model_config.py covers small-model and CPU-debug config behavior without constructing the full Agent.