技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-collection【数据与研究】Use Tianshou data carriers, replay buffers, collectors, return batches, and collection statistics safely.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task mentions Tianshou Batch slicing/merging, BatchProtocol, ReplayBuffer, VectorReplayBuffer, PrioritizedReplayBuffer, HERReplayBuffer, Collector.collect, AsyncCollector, n-step return inputs, collection hooks, CollectStats, InfoStats, SequenceSummaryStats, or MalformedBufferError.
Experiment.run, or how collectors are scheduled during learning, route to ../procedural-training/SKILL.md.DummyVectorEnv, SubprocVectorEnv, worker choices, async vectorization, EnvPool, or environment construction details, route to ../envs-and-vectorization/SKILL.md.../offline-and-specialized-rl/SKILL.md.references/api-reference.md for object contracts, required keys, buffer variants, stats classes, and key signatures.references/workflows.md for practical recipes: shaping batches, adding/sampling buffers, collecting by step or episode, hooks, and validation.references/troubleshooting.md for common shape, null, NaN, malformed-buffer, and collector reset failures.scripts/check_batch_buffer_collector.py for a safe local smoke check of Batch, ReplayBuffer, and a minimal collector.python skills/tianshou/sub-skills/data-collection/scripts/check_batch_buffer_collector.py --help.Batch with consistent first dimensions; nested dictionaries become nested Batch objects.obs, act, rew, terminated, truncated, obs_next, and info; done is inferred by the buffer.VectorReplayBuffer(total_size, buffer_num) whenever collecting from multiple vectorized environments.collector.reset() or use collector.collect(..., reset_before_collect=True) before the first collection.n_episode rather than n_step when an episode-level hook writes fields for whole episodes.Run the bundled script after install/import changes or when debugging a data path:
python skills/tianshou/sub-skills/data-collection/scripts/check_batch_buffer_collector.py
Use --skip-collector if only Batch and ReplayBuffer need validation or optional Gymnasium collection dependencies are unavailable.