ruler_score_group drops group exceptions, metadata and metrics, and trajectory policy versions
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
Start with art/rewards/ruler.py and trace how ruler_score_group rebuilds trajectories and the group. Compare the fields it preserves with the expected behavior in the issue, then run the reproduction provided in the report. Done means scored groups retain the listed group and trajectory fields while only reward, RULER metrics, and the RULER log line change; pull request #1143 is already open for this issue.
由索引模型根据 Issue 内容生成。
描述
ruler_score_group rebuilds the group it scores, and the rebuilt group loses everything except the trajectories' messages, reward, metrics, metadata and logs:
- Group level:
exceptions,metadata,metricsandlogsare dropped. It returnsart.TrajectoryGroup(new_trajectories). - Trajectory level:
initial_policy_version,final_policy_versionand the private_policy_token_countsare dropped, andstart_timeis reset to the time of scoring.
The documented usage is gather_trajectory_groups(..., after_each=lambda g: ruler_score_group(g, ...)), so every RULER-scored group reaches model.log / training without this information:
exception_rateis computed fromgroup.exceptions(model.py), so failed rollouts in a group no longer register. A run whose rollouts are erroring reports an exception rate of 0.metrics_taxonomyreadsscenario_idfromgroup.metadataand counts attempted rollouts aslen(trajectories) + len(exceptions). Both are lost.- Custom group metrics (
group_*) disappear from the logged metrics. PipelineTrainerreads the trajectory policy versions and token counts for staleness and policy-age metrics. A group scored insiderollout_fnfrom a cached or replayed rollout loses its recorded age, and_apply_policy_versionsthen stamps the current worker version on it.
Reproduced on main at 5f0c1fb, with ruler stubbed (no judge call):
import asyncio, importlib
from types import SimpleNamespace
import art
ruler_module = importlib.import_module("art.rewards.ruler")
async def fake_ruler(message_lists, **kwargs):
return [SimpleNamespace(score=1.0, explanation="") for _ in message_lists]
ruler_module.ruler = fake_ruler
t = art.Trajectory(
messages_and_choices=[{"role": "user", "content": "q"}, {"role": "assistant", "content": "a"}],
initial_policy_version=3, final_policy_version=5,
)
group = art.TrajectoryGroup(
[t], exceptions=[RuntimeError("rollout failed")],
metadata={"scenario_id": "s-7"}, metrics={"latency": 1.5},
)
scored = asyncio.run(ruler_module.ruler_score_group(group, "judge"))
print(scored.exceptions, scored.metadata, scored.metrics)
print(scored.trajectories[0].initial_policy_version, scored.trajectories[0].final_policy_version)
[] {} {}
None None
Expected: the scored group keeps its exceptions, metadata, metrics and logs, and each trajectory keeps its policy versions, token counts and start time. Only the reward, ruler_score / independent_reward metrics and the RULER log line should change. The input group should stay untouched, as it is today.
- 主要语言
- Python
- 星标
- 10.8k
- 派生
- 1k
- 平均合并
- 12 小时 33 分钟
- 30 天内合并 PR
- 126
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenPipe/ART 的其他 Issue
-
gather_trajectory_groups / gather_trajectories leave sibling rollouts running after a failure可能已有人在做 @salma2vec 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Distributed group_mean casts group ids to float32, losing precision vs non-distributed path可能已有人在做 @OnePunchMonk 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Add from_entity parameter to _experimental_fork_checkpoint可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
trajectory_group_batches leaves started rollouts running after close, error or cancellation可能已有人在做 @salma2vec 于 1 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
维护者通常 1 天内回复
-
LocalBackend/Unsloth: gradient_accumulation_steps > 1 hangs the trainer (producer waits for one result per sequence)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 15/100
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
slavakurilyak/awesome-ai-agents#845 ·
维护者通常 1 天内回复
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directory可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭difficulty:2 enhancement good first issue
难度 1/5 1-3 小时 新手友好度 92/100
MakazhanAlpamys/Soup#2178 ·
维护者通常 1 天内回复
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-values未关闭
难度 2/5 1-3 小时 新手友好度 75/100
scverse/rapids-singlecell#854 ·
维护者通常 1 天内回复
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGL可能已有人在做 @ninglinLiu 今天认领。 未关闭area:frontend backend:slang bug direction:input
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 13 天内回复