tensorforce
Guide Tensorforce reinforcement-learning package workflows, including agents, environments, Runner execution, configuration modules, persistence, export, and troubleshooting.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- tensorforce
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guide Tensorforce reinforcement-learning package workflows, including agents, environments, Runner execution, configuration modules, persistence, export, and troubleshooting.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/configuration.md1.9 KB
- 参考文档references/installation-and-inspection.md3.4 KB
- 参考文档references/repo-provenance.md1.6 KB
- 参考文档references/repo-routing-metadata.json526 B
- 参考文档references/troubleshooting.md1.9 KB
- 脚本scripts/check_tensorforce_env.py2.7 KB
03 SKILL.md 正文
Tensorforce
Use this repo skill when a task involves the Tensorforce Python package: creating reinforcement-learning agents, defining Tensorforce environments, configuring networks/objectives/optimizers, running Runner training/evaluation, saving/loading/exporting agents, or diagnosing Tensorforce 0.6.x dependency and API issues.
Tensorforce is an older TensorFlow-based RL framework. Prefer bounded CPU smoke checks before long training, and treat optional simulator, GPU, TensorFlow Addons, and BOHB tuning integrations as opt-in capabilities that require their own dependencies and evidence.
Start here
- Read repo provenance before judging staleness for a checkout or package version.
- Read installation and inspection before installing, importing, or repairing dependencies.
- Run or adapt scripts/check_tensorforce_env.py to verify an installed Tensorforce runtime.
- Route the user task to the narrowest sub-skill below.
- Use cross-cutting troubleshooting for dependency, TensorFlow, Gym, optional extra, and package-age failures.
Route by task
| User task | Read |
|---|---|
Create/load agents, choose algorithm aliases, specify states/actions, use action masks, write act/observe or experience/update loops |
agents-and-specifications |
Configure networks, layers, preprocessing, memories, policies, objectives, optimizers, parameters, JSON/dict module specs, and config fields |
modules-and-configuration |
Implement or wrap environments, use Environment.create, Gym/custom adapters, reward shaping, vectorized/multi-actor/remote interaction, optional simulator adapters |
environments-and-interaction |
Run bounded training/evaluation with Runner, translate historical run.py flags, configure callbacks/logging/parallelism, reason about optional BOHB tuning |
runner-and-cli-workflows |
| Save/load agents, checkpoints, summaries/tracking, recorder/pretraining, and TensorFlow SavedModel export | persistence-export-and-recording |
Minimal import check
python - <<'PY'
import tensorforce
from tensorforce import Agent, Environment, Runner
print(tensorforce.__version__)
print(Agent.create, Environment.create, Runner)
PY
For a stronger smoke check from this skill directory:
python scripts/check_tensorforce_env.py --smoke-agent
Operating constraints
- Do not assume historical repository-level scripts, examples, benchmark configs, or tests exist in the user's project. Use the bundled references and scripts in this skill.
- Do not claim CARLA, ALE, Retro, ViZDoom, OpenSim/PLE, TensorFlow Addons, BOHB tuning, or GPU execution is verified unless the user's runtime has the required extra and a bounded check passes.
- Keep training examples short by default. Long RL runs are task experiments, not installation checks.
- Tensorforce 0.6.x dependency pins are old. If modern pip resolution fails around TensorFlow/NumPy/Gym, use installation and inspection and document the exact compatible environment chosen.
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).