[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74Z9VP9KWW6PDHXHV4K3BCS":3,"skill-same:01M74Z9VP9KWW6PDHXHV4K3BCS":116},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M74Z9VP9KWW6PDHXHV4K3BCS","pufferlib",null,"Version-aware guidance for PufferLib reinforcement-learning environments, vectorization, policies, PuffeRL training, evaluation, and safe checkpoint review. Use when adapting Gymnasium\u002FPettingZoo environments to published PufferLib 3.0.0 or working with the redesigned native 4.0 source line.","KalarisLabs\u002Fresearch-agent-skills","KalarisLabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F300878568?v=4","01M74Y7MT23GXXC56VM6TVSXZY","Kalarislabs","01M74Y7MTQM9REXZX4SNXWX95C",132,"MIT","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002FSKILL.md",[],[],"2026-11-11 17:47:46",false,"---\nname: pufferlib\ndescription: Version-aware guidance for PufferLib reinforcement-learning environments, vectorization, policies, PuffeRL training, evaluation, and safe checkpoint review. Use when adapting Gymnasium\u002FPettingZoo environments to published PufferLib 3.0.0 or working with the redesigned native 4.0 source line.\nlicense: MIT\ncompatibility: Bundled CLIs require Python 3.10+ and use only the standard library. Published pufferlib 3.0.0 supports Python >=3.9 but ships as a native-code source archive; current 4.0 source requires Python >=3.10, Torch >=2.9, and an audited CPU\u002FCUDA toolchain. Network, GPU, native builds, environment plug-ins, assets, checkpoints, and external logging are never required by the bundled CLIs.\nallowed-tools: Read Bash Grep Python\nmetadata:\n  version: '1.2'\n  category: data-science-and-ml\n  maintainer: Kalaris Labs\n  last-reviewed: '2026-07-23'\n  tags: reinforcement learning, RL environments, training, machine learning\n---\n\n# PufferLib\n\nUse PufferLib with an explicit version profile. Upstream currently has two\nincompatible surfaces:\n\n| Profile | Status on 2026-07-23 | Main use |\n|---|---|---|\n| `pufferlib==3.0.0` | Latest stable PyPI release, published 2025-06-23 | Python\u002FGymnasium\u002FPettingZoo emulation, `pufferlib.vector`, Torch PuffeRL |\n| source `4.0` | Upstream default branch; not the latest stable PyPI artifact | Native C Ocean environments, native CUDA trainer, optional Torch fallback |\n\nDo not combine 3.0 imports with 4.0 config\u002FCLI examples. The 4.0 redesign\nremoved the 3.0 `emulation`, `vector`, and `pytorch` modules from the current\npackage tree.\n\n## Safe defaults\n\n1. Start with bundled synthetic, CPU-only, network-free tools.\n2. Do not import an arbitrary environment by dotted path. Bundled tools accept\n   only allowlisted built-ins and slug identifiers.\n3. Do not install or execute an unreviewed environment package, native\n   extension, ROM, map, checkpoint, or pickle file.\n4. Verify official source, immutable revision, licenses, checksums or\n   attestations, and build hooks. Sandbox native builds and first execution.\n5. Cap steps, environments, agents, workers, threads, buffers, memory, disk,\n   render size, and wall time.\n6. Keep training and evaluation environments\u002Fseeds separate.\n7. Default logging to local\u002Fnone. External logging requires explicit opt-in,\n   disclosure acknowledgment, and separate artifact-upload approval.\n8. Never pass W&B or Neptune credentials via CLI, INI, JSON, tags, run names, or\n   logger configuration. Never print them.\n9. Never dump all environment variables or recursively search for `.env`.\n10. Hash checkpoint bytes before trusted, sandboxed loading; metadata inspection\n    is not proof of safety.\n\n## First local checks\n\nAll bundled CLIs are dependency-free and emit strict JSON:\n\n```bash\npython3 scripts\u002Fenv_template.py --help\npython3 scripts\u002Fenv_contract_validator.py\npython3 scripts\u002Fbenchmark_vectorization.py --backend serial\npython3 scripts\u002Ftrain_template.py\npython3 scripts\u002Fvalidate_plan.py\npython3 scripts\u002Frepro_plan.py\n```\n\nDefaults are synthetic, deterministic, bounded, local, CPU-only, no-network,\nand dry-run where training would otherwise occur.\n\n## Installation and provenance\n\n### Published 3.0.0\n\nPyPI supplies only `pufferlib-3.0.0.tar.gz`:\n\n```text\nsha256: 7df3a3e3f5f894d78d2a1f5374097890aec01473183e748abefe4f3faa10eaa9\nRequires-Python: >=3.9\n```\n\nAfter source\u002Fbuild review, create a pinned uv project:\n\n```bash\nuv venv --python 3.11\nuv add --exact --no-sync \"pufferlib==3.0.0\"\nuv lock\nuv sync --frozen\n```\n\nCommit `pyproject.toml` and `uv.lock`; verify the archive digest and every\nresolved dependency. The source build can compile native code and fetch build\nassets, so resolve\u002Fbuild in a sandbox without credentials or sensitive mounts.\nThe uploaded metadata does not pin Torch or CUDA; do not claim a supported CUDA\nmatrix that PyPI does not declare.\n\n### Current 4.0 source\n\nThe reviewed branch head on 2026-07-23 was:\n\n```text\n25647630e1b15330bb3153a5a0d3ff8d234c3acf\n```\n\nPin the commit, not branch `4.0`:\n\n```bash\nuv add --no-sync \\\n  \"pufferlib @ git+https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib.git@25647630e1b15330bb3153a5a0d3ff8d234c3acf\"\nuv lock\n```\n\nThe current package declares Python `>=3.10` and Torch `>=2.9`. Upstream\nPufferTank currently uses Ubuntu 24.04, Python 3.12, and an NVIDIA CUDA\n13.0.2\u002FcuDNN development image with the `cu130` Torch index, but does not pin\nthe exact Torch wheel or all system packages. Treat it as a reference, not a\ncomplete lock. Never execute a remote installer directly from a pipe.\n\nRead `references\u002Ftraining.md` before any installation or build.\n\n## Environment workflow\n\n### 1. Validate the contract\n\nGymnasium reset returns `(observation, info)`. Step returns:\n\n```python\n(observation, reward, terminated, truncated, info)\n```\n\nValidate spaces, shapes, dtypes, finite rewards, booleans, reset-before-step,\nreset-after-end, seeding, and cleanup. `terminated` is an MDP terminal;\n`truncated` is an external cutoff such as a time limit. Preserve the distinction\nfor bootstrapping and metrics.\n\n```bash\npython3 scripts\u002Fenv_contract_validator.py \\\n  --steps 64 --episodes 8 --seed 42\n```\n\n### 2. Adapt only after review\n\nPublished 3.0 uses explicit wrappers:\n\n```python\nimport pufferlib.emulation\n\nwrapped = pufferlib.emulation.GymnasiumPufferEnv(reviewed_gymnasium_instance)\n```\n\nFor a reviewed PettingZoo Parallel environment:\n\n```python\nwrapped = pufferlib.emulation.PettingZooPufferEnv(reviewed_parallel_instance)\n```\n\nThere is no supported 3.0 `pufferlib.emulate(...)` shortcut matching the old\nskill. Read `references\u002Fenvironments.md` and `references\u002Fintegration.md`.\n\n### 3. Native environments\n\nPublished 3.0 `PufferEnv` requires\n`single_observation_space`, `single_action_space`, and `num_agents` before\n`super().__init__(buf)`. It uses in-place vector buffers and returns separate\nterminal\u002Ftruncation arrays plus a list of info dictionaries.\n\nCurrent 4.0 uses C bindings. Start from upstream `ocean\u002Fsquared` (single-agent)\nor `ocean\u002Ftarget` (multi-agent), build one environment in local\u002Fsanitized mode,\nand verify every buffer size\u002Ftype\u002Findex before optimization.\n\n## Vectorization workflow\n\nPublished 3.0:\n\n```python\nimport pufferlib.vector\n\nvecenv = pufferlib.vector.make(\n    reviewed_creator,\n    backend=pufferlib.vector.Serial,\n    num_envs=4,\n    seed=42,\n)\n```\n\nMove to `Multiprocessing` only after serial traces pass. Record\n`num_envs`, `num_workers`, `batch_size`, zero-copy mode, start method, agent\ncount, masks, and actual returned shapes. For multi-agent environments, batch\nlength is based on agent slots, not necessarily `num_envs`.\n\nCurrent 4.0 config instead uses:\n\n```ini\n[vec]\ntotal_agents = 4096\nnum_buffers = 2\nnum_threads = 16\n```\n\nRead `references\u002Fvectorization.md`. Benchmark fixed work with warmup and at least\nthree repeats; report simulation and end-to-end training SPS separately. The\nbundled benchmark measures only its synthetic harness.\n\n## Policy workflow\n\nPublished 3.0 policies are Torch modules sized from\n`single_observation_space`\u002F`single_action_space`. Stable recurrent composition\nuses `encode_observations` and `decode_actions`; structured emulation uses\n`pufferlib.pytorch.nativize_dtype` and `nativize_tensor`.\n\nCurrent 4.0 Torch fallback composes:\n\n```python\npufferlib.models.Policy(encoder=encoder, decoder=decoder, network=network)\n```\n\nIt provides MLP, MinGRU, LSTM, and GRU network choices; `--slowly` selects this\nfallback instead of the native backend. Check output\u002Fstate shapes, masks,\nfinite values, gradients, and eager-versus-compiled behavior. See\n`references\u002Fpolicies.md`.\n\n## Training and evaluation\n\nPublished 3.0 trainer import:\n\n```python\nfrom pufferlib import pufferl\n\ntrainer = pufferl.PuffeRL(train_config, vecenv, policy)\n```\n\nCurrent 4.0 CLI:\n\n```bash\npuffer train ENV_NAME\npuffer eval ENV_NAME --load-model-path EXACT_TRUSTED_PATH\npuffer sweep ENV_NAME\n```\n\nGenerate a plan instead of launching by default:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --profile pypi-3.0.0 \\\n  --environment synthetic \\\n  --device cpu \\\n  --total-timesteps 10000\n```\n\nValidate a custom strict-JSON plan:\n\n```bash\npython3 scripts\u002Fvalidate_plan.py --root . --config plan.json\n```\n\nThe schema rejects secret-bearing keys, unbounded resources, dotted environment\npaths, invalid vector divisibility, mixed-version options, and coupled\ntrain\u002Feval seeds. See `references\u002Ftraining.md`.\n\n## Logging\n\nPufferLib 3.0 exposes W&B and Neptune; current 4.0 CLI exposes W&B. Both are\noptional external services. They may transmit configuration, metrics, source\nmetadata, hardware telemetry, output, and approved artifacts, with privacy,\nretention, access-control, and cost implications.\n\n- W&B credential: named environment variable `WANDB_API_KEY`.\n- Neptune credential: named environment variable `NEPTUNE_API_TOKEN`.\n- Never put values in arguments\u002Fconfig\u002Flogs.\n- Sanitize config keys before logging.\n- Keep source\u002Fmodel upload off unless explicitly approved.\n\nThe planner requires both:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --logger wandb \\\n  --enable-external-logging \\\n  --acknowledge-external-disclosure\n```\n\nIt reports only the required variable name and never reads its value.\n\n## Checkpoint workflow\n\nPufferLib 3.0 and the 4.0 Torch fallback use Torch serialization; current native\n4.0 writes opaque `.bin` weights. PyTorch warns that untrusted models are\nprograms and that `torch.load` uses unpickling.\n\n```bash\npython3 scripts\u002Finspect_checkpoint.py checkpoint.pt \\\n  --root . \\\n  --expected-sha256 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n```\n\nThe inspector hashes and classifies only. It does not call `torch.load`, import\npickle\u002FTorch, inspect archive members, or extract files. Verify source, license,\narchitecture, environment revision, sidecar metadata, and checksum before any\nsandboxed load. Never use `latest` in a reproducible evaluation.\n\n## Bundled files\n\n### Scripts\n\n- `scripts\u002Fenv_template.py` — deterministic synthetic Gymnasium-style template.\n- `scripts\u002Fenv_contract_validator.py` — bounded contract and seed checks.\n- `scripts\u002Fbenchmark_vectorization.py` — capped serial\u002Fspawn synthetic benchmark.\n- `scripts\u002Ftrain_template.py` — non-executing 3.0\u002F4.0 training-plan generator.\n- `scripts\u002Fvalidate_plan.py` — strict config\u002Fresource\u002Fsecurity validator.\n- `scripts\u002Finspect_checkpoint.py` — metadata\u002Fhash inspection without deserialization.\n- `scripts\u002Frepro_plan.py` — separate-seed evaluation and benchmark plan.\n\n### References\n\n- `references\u002Fenvironments.md` — Gymnasium, stable PufferEnv, emulation, native C.\n- `references\u002Fvectorization.md` — backends, shapes, start methods, benchmarks.\n- `references\u002Fpolicies.md` — stable\u002Fcurrent policy contracts and state safety.\n- `references\u002Ftraining.md` — installs, config, CLI, PuffeRL, eval, logs, checkpoints.\n- `references\u002Fintegration.md` — migration matrix, third-party and credential safety.\n\n## Dated upstream sources\n\n- [PyPI pufferlib 3.0.0](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpufferlib\u002F3.0.0\u002F) —\n  released 2025-06-23; checked 2026-07-23.\n- [PyPI 3.0.0 metadata](https:\u002F\u002Fpypi.org\u002Fpypi\u002Fpufferlib\u002F3.0.0\u002Fjson) —\n  digest\u002Fdependencies; checked 2026-07-23.\n- [PufferLib official docs](https:\u002F\u002Fpuffer.ai\u002Fdocs.html) — current 4.0 docs;\n  checked 2026-07-23.\n- [PufferLib source](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib) — default branch and\n  implementation; checked 2026-07-23.\n- [PufferTank 4.0 Dockerfile](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferTank\u002Fblob\u002F4.0\u002Fpuffertank.dockerfile)\n  — CUDA\u002FPython reference; checked 2026-07-23.\n- [PufferLib 2.0 paper](https:\u002F\u002Fopenreview.net\u002Fforum?id=qRyteMTgn0) —\n  Reinforcement Learning Journal, 2025; use only for its stated benchmarks.\n- [PufferLib compatibility paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2406.12905) —\n  submitted 2024-06-18; describes an earlier API\u002Fperformance profile.\n\n## Related skills\n\n- `stable-baselines3`: Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API.\n- `evaluating-cosmos-policy`: Evaluates NVIDIA Cosmos Policy on LIBERO and RoboCasa simulation environments.\n- `fine-tuning-serving-openpi`: Fine-tune and serve Physical Intelligence OpenPI models (pi0, pi0-fast, pi0.5) using JAX or PyTorch backends for robot policy inference acr…\n","# PufferLib\n\nUse PufferLib with an explicit version profile. Upstream currently has two\nincompatible surfaces:\n\n| Profile | Status on 2026-07-23 | Main use |\n|---|---|---|\n| `pufferlib==3.0.0` | Latest stable PyPI release, published 2025-06-23 | Python\u002FGymnasium\u002FPettingZoo emulation, `pufferlib.vector`, Torch PuffeRL |\n| source `4.0` | Upstream default branch; not the latest stable PyPI artifact | Native C Ocean environments, native CUDA trainer, optional Torch fallback |\n\nDo not combine 3.0 imports with 4.0 config\u002FCLI examples. The 4.0 redesign\nremoved the 3.0 `emulation`, `vector`, and `pytorch` modules from the current\npackage tree.\n\n## Safe defaults\n\n1. Start with bundled synthetic, CPU-only, network-free tools.\n2. Do not import an arbitrary environment by dotted path. Bundled tools accept\n   only allowlisted built-ins and slug identifiers.\n3. Do not install or execute an unreviewed environment package, native\n   extension, ROM, map, checkpoint, or pickle file.\n4. Verify official source, immutable revision, licenses, checksums or\n   attestations, and build hooks. Sandbox native builds and first execution.\n5. Cap steps, environments, agents, workers, threads, buffers, memory, disk,\n   render size, and wall time.\n6. Keep training and evaluation environments\u002Fseeds separate.\n7. Default logging to local\u002Fnone. External logging requires explicit opt-in,\n   disclosure acknowledgment, and separate artifact-upload approval.\n8. Never pass W&B or Neptune credentials via CLI, INI, JSON, tags, run names, or\n   logger configuration. Never print them.\n9. Never dump all environment variables or recursively search for `.env`.\n10. Hash checkpoint bytes before trusted, sandboxed loading; metadata inspection\n    is not proof of safety.\n\n## First local checks\n\nAll bundled CLIs are dependency-free and emit strict JSON:\n\n```bash\npython3 scripts\u002Fenv_template.py --help\npython3 scripts\u002Fenv_contract_validator.py\npython3 scripts\u002Fbenchmark_vectorization.py --backend serial\npython3 scripts\u002Ftrain_template.py\npython3 scripts\u002Fvalidate_plan.py\npython3 scripts\u002Frepro_plan.py\n```\n\nDefaults are synthetic, deterministic, bounded, local, CPU-only, no-network,\nand dry-run where training would otherwise occur.\n\n## Installation and provenance\n\n### Published 3.0.0\n\nPyPI supplies only `pufferlib-3.0.0.tar.gz`:\n\n```text\nsha256: 7df3a3e3f5f894d78d2a1f5374097890aec01473183e748abefe4f3faa10eaa9\nRequires-Python: >=3.9\n```\n\nAfter source\u002Fbuild review, create a pinned uv project:\n\n```bash\nuv venv --python 3.11\nuv add --exact --no-sync \"pufferlib==3.0.0\"\nuv lock\nuv sync --frozen\n```\n\nCommit `pyproject.toml` and `uv.lock`; verify the archive digest and every\nresolved dependency. The source build can compile native code and fetch build\nassets, so resolve\u002Fbuild in a sandbox without credentials or sensitive mounts.\nThe uploaded metadata does not pin Torch or CUDA; do not claim a supported CUDA\nmatrix that PyPI does not declare.\n\n### Current 4.0 source\n\nThe reviewed branch head on 2026-07-23 was:\n\n```text\n25647630e1b15330bb3153a5a0d3ff8d234c3acf\n```\n\nPin the commit, not branch `4.0`:\n\n```bash\nuv add --no-sync \\\n  \"pufferlib @ git+https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib.git@25647630e1b15330bb3153a5a0d3ff8d234c3acf\"\nuv lock\n```\n\nThe current package declares Python `>=3.10` and Torch `>=2.9`. Upstream\nPufferTank currently uses Ubuntu 24.04, Python 3.12, and an NVIDIA CUDA\n13.0.2\u002FcuDNN development image with the `cu130` Torch index, but does not pin\nthe exact Torch wheel or all system packages. Treat it as a reference, not a\ncomplete lock. Never execute a remote installer directly from a pipe.\n\nRead `references\u002Ftraining.md` before any installation or build.\n\n## Environment workflow\n\n### 1. Validate the contract\n\nGymnasium reset returns `(observation, info)`. Step returns:\n\n```python\n(observation, reward, terminated, truncated, info)\n```\n\nValidate spaces, shapes, dtypes, finite rewards, booleans, reset-before-step,\nreset-after-end, seeding, and cleanup. `terminated` is an MDP terminal;\n`truncated` is an external cutoff such as a time limit. Preserve the distinction\nfor bootstrapping and metrics.\n\n```bash\npython3 scripts\u002Fenv_contract_validator.py \\\n  --steps 64 --episodes 8 --seed 42\n```\n\n### 2. Adapt only after review\n\nPublished 3.0 uses explicit wrappers:\n\n```python\nimport pufferlib.emulation\n\nwrapped = pufferlib.emulation.GymnasiumPufferEnv(reviewed_gymnasium_instance)\n```\n\nFor a reviewed PettingZoo Parallel environment:\n\n```python\nwrapped = pufferlib.emulation.PettingZooPufferEnv(reviewed_parallel_instance)\n```\n\nThere is no supported 3.0 `pufferlib.emulate(...)` shortcut matching the old\nskill. Read `references\u002Fenvironments.md` and `references\u002Fintegration.md`.\n\n### 3. Native environments\n\nPublished 3.0 `PufferEnv` requires\n`single_observation_space`, `single_action_space`, and `num_agents` before\n`super().__init__(buf)`. It uses in-place vector buffers and returns separate\nterminal\u002Ftruncation arrays plus a list of info dictionaries.\n\nCurrent 4.0 uses C bindings. Start from upstream `ocean\u002Fsquared` (single-agent)\nor `ocean\u002Ftarget` (multi-agent), build one environment in local\u002Fsanitized mode,\nand verify every buffer size\u002Ftype\u002Findex before optimization.\n\n## Vectorization workflow\n\nPublished 3.0:\n\n```python\nimport pufferlib.vector\n\nvecenv = pufferlib.vector.make(\n    reviewed_creator,\n    backend=pufferlib.vector.Serial,\n    num_envs=4,\n    seed=42,\n)\n```\n\nMove to `Multiprocessing` only after serial traces pass. Record\n`num_envs`, `num_workers`, `batch_size`, zero-copy mode, start method, agent\ncount, masks, and actual returned shapes. For multi-agent environments, batch\nlength is based on agent slots, not necessarily `num_envs`.\n\nCurrent 4.0 config instead uses:\n\n```ini\n[vec]\ntotal_agents = 4096\nnum_buffers = 2\nnum_threads = 16\n```\n\nRead `references\u002Fvectorization.md`. Benchmark fixed work with warmup and at least\nthree repeats; report simulation and end-to-end training SPS separately. The\nbundled benchmark measures only its synthetic harness.\n\n## Policy workflow\n\nPublished 3.0 policies are Torch modules sized from\n`single_observation_space`\u002F`single_action_space`. Stable recurrent composition\nuses `encode_observations` and `decode_actions`; structured emulation uses\n`pufferlib.pytorch.nativize_dtype` and `nativize_tensor`.\n\nCurrent 4.0 Torch fallback composes:\n\n```python\npufferlib.models.Policy(encoder=encoder, decoder=decoder, network=network)\n```\n\nIt provides MLP, MinGRU, LSTM, and GRU network choices; `--slowly` selects this\nfallback instead of the native backend. Check output\u002Fstate shapes, masks,\nfinite values, gradients, and eager-versus-compiled behavior. See\n`references\u002Fpolicies.md`.\n\n## Training and evaluation\n\nPublished 3.0 trainer import:\n\n```python\nfrom pufferlib import pufferl\n\ntrainer = pufferl.PuffeRL(train_config, vecenv, policy)\n```\n\nCurrent 4.0 CLI:\n\n```bash\npuffer train ENV_NAME\npuffer eval ENV_NAME --load-model-path EXACT_TRUSTED_PATH\npuffer sweep ENV_NAME\n```\n\nGenerate a plan instead of launching by default:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --profile pypi-3.0.0 \\\n  --environment synthetic \\\n  --device cpu \\\n  --total-timesteps 10000\n```\n\nValidate a custom strict-JSON plan:\n\n```bash\npython3 scripts\u002Fvalidate_plan.py --root . --config plan.json\n```\n\nThe schema rejects secret-bearing keys, unbounded resources, dotted environment\npaths, invalid vector divisibility, mixed-version options, and coupled\ntrain\u002Feval seeds. See `references\u002Ftraining.md`.\n\n## Logging\n\nPufferLib 3.0 exposes W&B and Neptune; current 4.0 CLI exposes W&B. Both are\noptional external services. They may transmit configuration, metrics, source\nmetadata, hardware telemetry, output, and approved artifacts, with privacy,\nretention, access-control, and cost implications.\n\n- W&B credential: named environment variable `WANDB_API_KEY`.\n- Neptune credential: named environment variable `NEPTUNE_API_TOKEN`.\n- Never put values in arguments\u002Fconfig\u002Flogs.\n- Sanitize config keys before logging.\n- Keep source\u002Fmodel upload off unless explicitly approved.\n\nThe planner requires both:\n\n```bash\npython3 scripts\u002Ftrain_template.py \\\n  --logger wandb \\\n  --enable-external-logging \\\n  --acknowledge-external-disclosure\n```\n\nIt reports only the required variable name and never reads its value.\n\n## Checkpoint workflow\n\nPufferLib 3.0 and the 4.0 Torch fallback use Torch serialization; current native\n4.0 writes opaque `.bin` weights. PyTorch warns that untrusted models are\nprograms and that `torch.load` uses unpickling.\n\n```bash\npython3 scripts\u002Finspect_checkpoint.py checkpoint.pt \\\n  --root . \\\n  --expected-sha256 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n```\n\nThe inspector hashes and classifies only. It does not call `torch.load`, import\npickle\u002FTorch, inspect archive members, or extract files. Verify source, license,\narchitecture, environment revision, sidecar metadata, and checksum before any\nsandboxed load. Never use `latest` in a reproducible evaluation.\n\n## Bundled files\n\n### Scripts\n\n- `scripts\u002Fenv_template.py` — deterministic synthetic Gymnasium-style template.\n- `scripts\u002Fenv_contract_validator.py` — bounded contract and seed checks.\n- `scripts\u002Fbenchmark_vectorization.py` — capped serial\u002Fspawn synthetic benchmark.\n- `scripts\u002Ftrain_template.py` — non-executing 3.0\u002F4.0 training-plan generator.\n- `scripts\u002Fvalidate_plan.py` — strict config\u002Fresource\u002Fsecurity validator.\n- `scripts\u002Finspect_checkpoint.py` — metadata\u002Fhash inspection without deserialization.\n- `scripts\u002Frepro_plan.py` — separate-seed evaluation and benchmark plan.\n\n### References\n\n- `references\u002Fenvironments.md` — Gymnasium, stable PufferEnv, emulation, native C.\n- `references\u002Fvectorization.md` — backends, shapes, start methods, benchmarks.\n- `references\u002Fpolicies.md` — stable\u002Fcurrent policy contracts and state safety.\n- `references\u002Ftraining.md` — installs, config, CLI, PuffeRL, eval, logs, checkpoints.\n- `references\u002Fintegration.md` — migration matrix, third-party and credential safety.\n\n## Dated upstream sources\n\n- [PyPI pufferlib 3.0.0](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpufferlib\u002F3.0.0\u002F) —\n  released 2025-06-23; checked 2026-07-23.\n- [PyPI 3.0.0 metadata](https:\u002F\u002Fpypi.org\u002Fpypi\u002Fpufferlib\u002F3.0.0\u002Fjson) —\n  digest\u002Fdependencies; checked 2026-07-23.\n- [PufferLib official docs](https:\u002F\u002Fpuffer.ai\u002Fdocs.html) — current 4.0 docs;\n  checked 2026-07-23.\n- [PufferLib source](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib) — default branch and\n  implementation; checked 2026-07-23.\n- [PufferTank 4.0 Dockerfile](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferTank\u002Fblob\u002F4.0\u002Fpuffertank.dockerfile)\n  — CUDA\u002FPython reference; checked 2026-07-23.\n- [PufferLib 2.0 paper](https:\u002F\u002Fopenreview.net\u002Fforum?id=qRyteMTgn0) —\n  Reinforcement Learning Journal, 2025; use only for its stated benchmarks.\n- [PufferLib compatibility paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2406.12905) —\n  submitted 2024-06-18; describes an earlier API\u002Fperformance profile.\n\n## Related skills\n\n- `stable-baselines3`: Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API.\n- `evaluating-cosmos-policy`: Evaluates NVIDIA Cosmos Policy on LIBERO and RoboCasa simulation environments.\n- `fine-tuning-serving-openpi`: Fine-tune and serve Physical Intelligence OpenPI models (pi0, pi0-fast, pi0.5) using JAX or PyTorch backends for robot policy inference acr…\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":30,"compatibility":31},{"tags":25,"version":26,"category":27,"maintainer":28,"last-reviewed":29},"reinforcement learning, RL environments, training, machine learning","1.2","data-science-and-ml","Kalaris Labs","2026-07-23","Read Bash Grep Python","Bundled CLIs require Python 3.10+ and use only the standard library. Published pufferlib 3.0.0 supports Python >=3.9 but ships as a native-code source archive; current 4.0 source requires Python >=3.10, Torch >=2.9, and an audited CPU\u002FCUDA toolchain. Network, GPU, native builds, environment plug-ins, assets, checkpoints, and external logging are never required by the bundled CLIs.","main","29fe36d26127205057d5e0ed8425f6b0e9a8c13a","skills\u002Fpufferlib",16,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills","https:\u002F\u002Fdocs.kalarislabs.com\u002Fresearch-agent-skills","https:\u002F\u002Fgithub.com\u002FKalarisLabs","kalarislabs.com","Applied AI lab building the infrastructure for the agentic era","2026-11-14 17:49:08",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add KalarisLabs\u002Fresearch-agent-skills --skill pufferlib",{"tool":48,"command":49},"bunx","bunx skills add KalarisLabs\u002Fresearch-agent-skills --skill pufferlib",{"tool":51,"command":52},"pnpm","pnpm dlx skills add KalarisLabs\u002Fresearch-agent-skills --skill pufferlib","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002FSKILL.md",true,[56,62,66,70,74,78,84,88,92,96,100,104,108,112],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fenvironments.md","REFERENCE","参考文档",9340,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Freferences\u002Fenvironments.md",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fintegration.md",8876,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Freferences\u002Fintegration.md",{"path":67,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fpolicies.md",6962,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Freferences\u002Fpolicies.md",{"path":71,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Ftraining.md",10424,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Freferences\u002Ftraining.md",{"path":75,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fvectorization.md",8402,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Freferences\u002Fvectorization.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002F__init__.py","SCRIPT","脚本",62,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002F__init__.py",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002F_common.py",6807,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002F_common.py",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fbenchmark_vectorization.py",8481,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fbenchmark_vectorization.py",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Fenv_contract_validator.py",7064,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fenv_contract_validator.py",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Fenv_template.py",7530,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fenv_template.py",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Finspect_checkpoint.py",7022,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002Finspect_checkpoint.py",{"path":105,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Frepro_plan.py",6093,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002Frepro_plan.py",{"path":109,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Ftrain_template.py",10090,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002Ftrain_template.py",{"path":113,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":114,"sourceHtmlUrl":115},"scripts\u002Fvalidate_plan.py",18959,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpufferlib\u002Fscripts\u002Fvalidate_plan.py",[117,125,132,139,146,153],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":124},"01M74Z8MGT305R11SNY5G28QH5","plos","Prepare manuscripts for PLOS journals (PLOS ONE, PLOS Biology, PLOS Computational Biology, PLOS Genetics, PLOS Medicine, PLOS Pathogens, PLOS Neglected Tropical Diseases, PLOS Global Public Health and others), covering structure, abstract and author summary, Vancouver-style references, the mandatory data availability policy, ethics and financial disclosure statements, figure requirements (PACE), the PLOS LaTeX template, reporting guidelines and PLOS ONE's publication criteria. Use when targeting any PLOS journal or checking compliance with PLOS policies.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fplos\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":124},"01M74Z8CCN9APXYHNQ95V1EBGT","pkpd-modeling","Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK\u002FPD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when analysing concentration-time data, deriving exposure metrics, fitting PK or PD models, or evaluating dosing regimens. Triggers include \"pharmacokinetics\", \"pharmacodynamics\", \"PK\u002FPD\", \"NCA\", \"non-compartmental\", \"AUC\", \"Cmax\", \"lambda z\", \"half-life\", \"clearance\", \"volume of distribution\", \"compartmental model\", \"population PK\", \"popPK\", \"NONMEM\", \"nlmixr2\", \"Pharmpy\", \"Monolix\", \"exposure-response\", \"Emax\", \"EC50\", \"indirect response\", \"effect compartment\", \"TMDD\", \"PBPK\", \"bioequivalence\", \"RSABE\", \"ABEL\", \"allometric scaling\", \"first-in-human\", \"MABEL\", \"drug-drug interaction\", \"DDI\", \"ICH M12\", \"concentration-QTc\", \"therapeutic drug monitoring\", \"MIPD\", and \"dosing regimen\".","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpkpd-modeling\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":124},"01M74Z86YHJJ1FM3X87BHN76KZ","pinecone","Guides use of Pinecone, a managed serverless vector database, through its Python client and the LangChain and LlamaIndex integrations. Covers creating indexes, upserting and querying vectors, metadata filtering, namespaces, hybrid dense and sparse search, index management, and deleting vectors. Use when building a production RAG system on a hosted vector store, adding semantic search or recommendations without running infrastructure, isolating per-user or per-tenant data with namespaces, combining dense and sparse vectors in one query, or filtering results by metadata. Do not use for self-hosted or local stores (Chroma, Weaviate) or offline similarity search (FAISS).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpinecone\u002FSKILL.md",[],[],{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":124},"01M74Z80T6E89SAJ8MYDD0767Q","pi-agent","Build with and use Pi, the minimal terminal coding harness. Use for installing Pi, configuring providers\u002Fmodels\u002Fsettings\u002Fenvironment variables, creating Pi skills\u002Fextensions\u002Fpackages\u002Fthemes\u002Fprompt templates, embedding Pi through the SDK, integrating over RPC or JSON event streams, parsing sessions, running local models through the llama.cpp router, developing custom Pi providers and TUI components, or using ecosystem packages such as pi-subagents (delegation\u002Forchestration), pi-mcp-adapter (MCP servers), pi-interview (interactive forms), and pi-web-access (web search, fetching, video understanding).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpi-agent\u002FSKILL.md",[],[],{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":124},"01M74Z7WF1Y8Q3VFAQPPPRAFMV","phoenix-observability","Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fphoenix-observability\u002FSKILL.md",[],[],{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":124},"01M74Z7HNEH1A2AVYR3G1X2QV6","peft-fine-tuning","Fine-tunes LLMs with Hugging Face PEFT, using LoRA, QLoRA, IA3, AdaLoRA, prefix tuning, and prompt tuning so that under 1% of parameters are trained. Covers rank, alpha, and target module selection, loading and merging adapters, multi-adapter serving, and integration with TRL SFTTrainer, Axolotl, and vLLM. Use when fine-tuning 7B-70B models on limited GPU memory, when running QLoRA on a single 24GB GPU, when choosing LoRA rank and alpha, when merging or swapping adapters on one base model, or when debugging CUDA OOM or an adapter that does not apply. Not for full fine-tuning of small models under 1B parameters or cases needing all weights updated.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpeft-fine-tuning\u002FSKILL.md",[],[]]