Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

ruler_score_group drops group exceptions, metadata and metrics, and trajectory policy versions

Đang mở
#1,142 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@salma2vec đang làm issue này rồi.

Từ ngày 22/10/2026.

  • #1143 của @salma2vec — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
machine-learning

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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, metrics and logs are dropped. It returns art.TrajectoryGroup(new_trajectories).
  • Trajectory level: initial_policy_version, final_policy_version and the private _policy_token_counts are dropped, and start_time is 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_rate is computed from group.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_taxonomy reads scenario_id from group.metadata and counts attempted rollouts as len(trajectories) + len(exceptions). Both are lost.
  • Custom group metrics (group_*) disappear from the logged metrics.
  • PipelineTrainer reads the trajectory policy versions and token counts for staleness and policy-age metrics. A group scored inside rollout_fn from a cached or replayed rollout loses its recorded age, and _apply_policy_versions then 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.

Ngôn ngữ chính
Python
Star
10.8k
Fork
1k
Merge trung bình
12 giờ 33 phút
Pull request đã merge (30 ngày)
126

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenPipe/ART

Tất cả issue của OpenPipe/ART

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.