AGENT SKILL

configuration

Routes DreamerV2 configuration construction, preset composition, typed flags, immutable updates, and schedule validation.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
configuration
license
MIT
metadata
{ "disco-role": "operating" }
description
Routes DreamerV2 configuration construction, preset composition, typed flags, immutable updates, and schedule validation.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

DreamerV2 configuration

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.

Route boundaries

Use this sub-skill for:

  • the defaults, atari, crafter, dmc_vision, dmc_proprio, and debug YAML presets;
  • ordered preset composition through --configs;
  • dotted keys, regular-expression key updates, and typed flag values;
  • Config.update(), Config.save()/Config.load(), and schedule syntax; and
  • high-impact model, replay, dataset, precision, JIT, and training cadence choices that are configuration values.

Route elsewhere for:

  • environment names, observation/action schemas, wrappers, or external assets: use environments;
  • launching training, logdir/checkpoint/replay lifecycle, GPU setup, or resume: use training; and
  • plot flags, metric aggregation, and run comparison: use evaluation.

Read the focused tables before changing a value:

Verified construction workflow

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Fast checks

  • python -m dreamerv2.train --help is a help-only parser check; it does not prove that a selected environment or GPU can train.
  • A typed config check should assert that YAML lists become tuples, a fractional integer is rejected, and a typo is rejected by Config.update().
  • A schedule check should evaluate one value at step 0, one interior value, and the endpoint using TensorFlow tensors. See the exact formulas in references/flags-and-config.md.
  • Keep generated 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.

High-impact decisions

  • Choose 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.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351