AGENT SKILL

pytorch-a2c-ppo-acktr-gail

Operate the PyTorch A2C/PPO/ACKTR/GAIL reinforcement-learning repository, including training commands, model components, GAIL demos, and troubleshooting.

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

01 前言 Front Matter

name
pytorch-a2c-ppo-acktr-gail
license
MIT
metadata
{ "disco-role": "operating" }
description
Operate the PyTorch A2C/PPO/ACKTR/GAIL reinforcement-learning repository, including training commands, model components, GAIL demos, and troubleshooting.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

pytorch-a2c-ppo-acktr-gail

Use this repo skill when a task involves the PyTorch implementation of A2C, PPO, ACKTR, and GAIL reinforcement-learning workflows, including Gym environment setup, training command construction, policy/rollout internals, checkpoint playback, or imitation-learning expert data.

Start Here

Sub-skill Routes

Task Load
Build or debug A2C/PPO/ACKTR training commands, evaluation intervals, checkpoint playback, Gym environment wrappers, or long-run experiment settings. sub-skills/training-workflows/SKILL.md
Inspect or modify Policy, CNNBase, MLPBase, distributions, RolloutStorage, A2C_ACKTR, PPO, KFAC, schedules, or tensor-shape behavior. sub-skills/model-components/SKILL.md
Convert expert demonstrations, validate GAIL HDF5/.pt formats, use ExpertDataset, or explain Discriminator/--gail behavior. sub-skills/gail-imitation/SKILL.md

Minimal Public Setup

This is an older Gym/PyTorch codebase. A practical environment needs the package, PyTorch, Gym, Stable-Baselines3 wrapper utilities, PyBullet support if using Bullet envs, Matplotlib, and h5py for GAIL files.

pip install -e .
pip install h5py
python - <<'PY'
import a2c_ppo_acktr
from a2c_ppo_acktr.model import Policy
from a2c_ppo_acktr.storage import RolloutStorage
print('import ok')
PY

If pybullet_envs fails with a Gym registry error, read references/troubleshooting.md before changing training code.

Safe Verification First

Do not start full Atari, MuJoCo, PyBullet, or GAIL training just to verify the setup. Prefer:

python scripts/check_install.py
python sub-skills/training-workflows/scripts/build_training_command.py --preset atari-ppo --env-name PongNoFrameskip-v4
python sub-skills/model-components/scripts/smoke_model_components.py
python sub-skills/gail-imitation/scripts/convert_gail_h5_to_pt.py --help

Only run long training after the user confirms the target environment, simulator dependencies, data availability, compute budget, and output directories.

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