计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
runner-and-cli-workflows【效率与协作】Use Tensorforce Runner training/evaluation workflows, CLI-equivalent semantics, logging, parallel execution, and optional BOHB tuning.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to run bounded Tensorforce training or evaluation through tensorforce.Runner, translate the historical runner CLI flags into public API calls, configure local/remote parallel execution, collect callback/logging metrics, or reason about optional BOHB hyperparameter tuning.
references/runner-workflows.md for the public Runner constructor/run signatures, safe train/evaluate recipes, callbacks, stopping criteria, and parallel modes.references/cli-reference.md when a user provides command-line style flags such as --agent, --environment, --episodes, --num-parallel, --remote, --path, or --save-best-agent; translate them to a self-contained Python wrapper instead of relying on a repository script.references/tuning.md only for optional BOHB/Hyperband tuning. Treat tuning dependencies and long optimization runs as optional, not part of the minimum Tensorforce runtime.references/troubleshooting.md for non-terminating runs, evaluation placement errors, parallel/socket mistakes, missing max_episode_timesteps, logging extras, or dependency-version issues surfaced while running workflows.scripts/quickstart_cartpole_smoke.py --help for a compact CartPole quickstart smoke, or scripts/tensorforce_runner_smoke.py --help for a CLI-like Runner smoke. Both scripts use the installed Tensorforce package and do not call any repository-level CLI script.act/observe, experience, or update loops, use agents-and-specifications.modules-and-configuration.Environment subclasses, Gym/adapter setup, reward shaping, vectorized/multi-actor environment contracts, or simulator backends, use environments-and-interaction.Agent.save, Agent.load, exported SavedModels, or best-agent persistence details, use persistence-export-and-recording after this sub-skill has established the runner workflow.from tensorforce import Runner
runner = Runner(
agent='random',
environment=dict(environment='custom_cartpole'),
max_episode_timesteps=10
)
try:
runner.run(num_episodes=3, use_tqdm=False)
print(runner.episode_returns)
finally:
runner.close()
Always pass at least one bounded stopping criterion (num_episodes, num_timesteps, or num_updates). Prefer use_tqdm=False for automation and CI logs.