计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
configuration【效率与协作】Routes DreamerV2 configuration construction, preset composition, typed flags, immutable updates, and schedule validation.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route to construct, inspect, serialize, or troubleshoot a DreamerV2
common.Config before handing it to training or the public API. The package
configuration is a typed, immutable flat/nested mapping; command-line flags
produce a new config rather than mutating the input.
Use this sub-skill for:
defaults, atari, crafter, dmc_vision, dmc_proprio, and debug
YAML presets;--configs;Config.update(), Config.save()/Config.load(), and schedule syntax; andRoute elsewhere for:
environments;training; andevaluation.Read the focused tables before changing a value:
Start from the public package defaults. For the Python API, use
import dreamerv2.api as dv2 and dv2.defaults; for the built-in runner,
provide a real writable --logdir rather than retaining /dev/null.
Select presets in the exact order they should override one another. The
runner first parses --configs, starts from defaults, then calls
config.update(configs[name]) once for each selected name. Later presets
win. defaults is the implicit selection when --configs is omitted.
Apply named dotted overrides after all presets, for example
--replay.minlen 10 --dataset.length 10 --precision 32. Use the exact
spelling and the value spelling documented in the references; do not invent
flags.
Preview and validate with a small Python process before a costly run. The safe preview helper is also available. The following is safe and does not create environments or checkpoints:
python - <<'PY'
import dreamerv2.api as dv2
cfg = dv2.defaults.update({'logdir': '/tmp/dreamerv2-config-preview'})
for name in ('atari', 'debug'):
cfg = cfg.update(dv2.configs[name])
cfg = cfg.parse_flags(['--replay.minlen', '10', '--replay.maxlen', '30'])
print(cfg)
print('flat replay:', {k: v for k, v in cfg.flat.items()
if k.startswith('replay.')})
PY
--configs is a runner flag; it is not a key in dv2.defaults. For direct
Python composition, load the package's preset mapping or reproduce the
runner's ordered Config.update() calls, then call parse_flags() only for
ordinary config keys.
Save a validated configuration beside a run with config.save(path), or
load a prior .yaml, .yml, or .json using Config.load(path). The
training runner saves its effective config as config.yaml in logdir.
Hand the resulting config to dv2.train() or to the training route. This
sub-skill does not launch training. The installed console launcher is known
to resolve configs.yaml from sys.argv[0]; use the verified module route
python -m dreamerv2.train ... instead.
python -m dreamerv2.train --help is a help-only parser check; it does not
prove that a selected environment or GPU can train.Config.update().config.yaml portable: use a path valid on the target host,
avoid source-checkout paths, and record the effective config after preset and
flag composition. Precision/JIT and environment availability still belong to
the downstream training gate.dmc_vision versus dmc_proprio according to the observation modality;
their encoder/decoder key filters and preset model sizes differ.atari changes image keys, action repeat, time limit, horizon, replay
prefill, optimizer rates, entropy, discount, and loss scales. It is not just
a task-name alias.crafter enables image-only model keys, achievement/reward logging, and a
regex update that sets every existing *.norm key to layer.debug must normally be last. It disables JIT and shortens evaluation,
logging, prefill, replay, and dataset settings; it does not make the native
runner CPU-safe, nor does it override precision.precision accepts only 16 or 32 in the built-in runner. jit: False enables
eager TensorFlow functions; jit: True leaves graph compilation enabled.
These are runtime choices, not proof that a config is otherwise valid.If a flag fails, preserve the exact error and compare it with references/troubleshooting.md; do not silently coerce a typo, fractional integer, empty list, or non-canonical boolean.