evo-kit
Build, inspect, and safely use PARL EvoKit, the optional C++ evolution-strategy toolkit with Torch or PaddleLite prediction backends.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- evo-kit
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Build, inspect, and safely use PARL EvoKit, the optional C++ evolution-strategy toolkit with Torch or PaddleLite prediction backends.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/build-and-api.md7.6 KB
- 参考文档references/troubleshooting.md6.3 KB
- 脚本scripts/check_evokit_prereqs.py6.4 KB
03 SKILL.md 正文
PARL EvoKit
Use this sub-skill when a task involves PARL's optional C++ EvoKit toolkit: ESAgent sampling/update loops, SamplingInfo records, C++ build prerequisites, Torch/libtorch versus PaddleLite backend selection, or safe interpretation of EvoKit build helpers.
Do not use this sub-skill for ordinary Python PARL Model / Algorithm / Agent code, xparl cluster orchestration, or selecting a full Python RL recipe. For high-level RL recipe structure, consult the sibling algorithm-recipes skill conceptually; EvoKit-specific work here is C++ ES toolkit work.
Operating workflow
-
Confirm EvoKit is actually needed. EvoKit is a C++ evolution-strategy toolkit for parameter perturbation, evaluation, and parameter updates. If the task only asks for a Python PARL algorithm, stay with the Python PARL skills instead.
-
Choose one prediction backend. Use Torch when the model is a C++
torch::nn::Moduleand a locallibtorch/tree is available. Use PaddleLite when the model is an exported Paddle inference model and a localinference_lite_lib/tree is available. Do not enable both backends in one EvoKit build. -
Check local prerequisites before building. Run the bundled checker from a repository checkout or a copied EvoKit tree:
python scripts/check_evokit_prereqs.py --project-root <evokit-root> --backend torchReplace
torchwithpaddlewhen using PaddleLite, or useautoto accept either backend directory. -
Model the ESAgent loop explicitly. The original agent owns the current parameters, sampling method, and optimizer. Clone sampling agents, call
add_noiseonly on clones, evaluate each noisy clone, keep eachSamplingInfopaired with its reward, then callupdateon the original agent. The update reconstructs perturbations fromSamplingInfokeys and applies the optimizer to the original parameters. -
Handle online/offline runs as data contracts. Online sampling should persist
SamplingInfoplus reward records in the same order used for offline update. Offline update should reload the current model/solver state, parse the records, callupdate, and save the next model/solver state. -
Avoid unsafe build shortcuts by default. Treat upstream shell helpers as examples only: they may remove build directories, install into the source tree, unzip bundled data, download libtorch, and run demos. Prefer an explicit local prerequisite check and a controlled manual CMake build in a disposable checkout or dedicated build directory.
-
Escalate by symptom. Use
references/build-and-api.mdfor API/build planning andreferences/troubleshooting.mdfor protobuf, backend library, CMake, gflags/glog/OpenMP, and ESAgent misuse errors.
Verification status
This sub-skill is source-evidence backed. The bundled checker was written to inspect local prerequisites without downloads or builds. EvoKit itself was not fully compiled during skill construction because the optional C++ backend libraries are environment-specific.
Reference map
references/build-and-api.md— distilled EvoKit C++ API concepts, config schema, Torch/PaddleLite choices, and safe build outline.references/troubleshooting.md— fixes and safety notes for protobuf/protoc, backend libraries, gflags/glog/OpenMP, build helper side effects, CMake cleanup, and ESAgent loop mistakes.scripts/check_evokit_prereqs.py— deterministic local prerequisite checker; it prints missing items and never downloads, builds, deletes, or writes project files.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).