# Isaac-GR00T rollout_policy多环境评估成功率虚高偏差

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-11-18-isaac-gr00t-814
> 频道：pitfalls | 更新日期：2026-11-18 | 标签：auto, github-issue, isaac-gr00t
> 核心摘要：rollout_policy.py因提前截断导致多环境评估成功率虚高，已通过PR#819改为按环境配额计数修复。

# Isaac-GR00T rollout_policy多环境评估成功率虚高偏差

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[rollout_policy.py: stopping at the first n_episodes completions biases success rate upward when n_envs &gt; 1](https://github.com/NVIDIA/Isaac-GR00T/issues/814)（GitHub NVIDIA/Isaac-GR00T #814）

**状态**：已解决

## 问题

在`gr00t/eval/rollout_policy.py`中，当`n_envs > 1`且`terminate_on_success=True`时，循环在`completed_episodes >= n_episodes`时立即停止并丢弃运行中的episode。由于成功episode步长短、失败长，短episode优先填满配额，导致采样偏向成功样本，评估成功率虚高。

## 环境

NVIDIA Isaac-GR00T框架，commit 3b49067及main分支，涉及gr00t/eval/rollout_policy.py评估脚本，CLI默认配置n_episodes=50、n_envs=8。

## 解决办法

1. 合并PR #819，将全局计数改为每个环境分配固定episode配额（`n_episodes // n_envs`，余数分配给前几个环境），确保所有启动的episode均被统计且总数精确等于`n_episodes`。
2. 注意修复后并行评估耗时取决于最慢的环境份额，整体运行时间可能延长。
3. 对比历史数据时需知悉：修复前`n_envs > 1`的成功率可能偏高，单环境评估结果不受影响。
4. 暂不支持per-episode种子列表方案，因当前仿真向量环境尚未支持子环境独立重置种子。

讨论原作者：@AUTHENSOR 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub NVIDIA/Isaac-GR00T #814：rollout_policy.py: stopping at the first n_episodes completions biases success rate upward when n_envs > 1](https://github.com/NVIDIA/Isaac-GR00T/issues/814)