gather_trajectory_groups / gather_trajectories leave sibling rollouts running after a failure
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- 78/100
Hướng nghiên cứu
Tìm các phần triển khai gather_trajectory_groups và gather_trajectories, rồi đọc cách chúng sử dụng asyncio.gather và xử lý max_exceptions. Thêm các bài kiểm thử async có trọng tâm cho trường hợp một rollout thất bại cùng lúc có một rollout anh em bị chặn ở cả hai điểm vào. Công việc hoàn tất khi luồng ngoại lệ hủy các rollout anh em và chờ chúng kết thúc, trong khi các lỗi được dung thứ và việc hủy task đang chờ vẫn hoạt động như mô tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
gather_trajectory_groups and gather_trajectories run their rollouts through asyncio.gather. When a rollout raises past max_exceptions, asyncio.gather re-raises that exception immediately, but it does not cancel the other awaitables, which keep running. The caller sees the failure and moves on (or the training step aborts), while the remaining rollouts keep calling the inference server, the environment and any after_each judge (e.g. RULER) with no owner. This is the same lifecycle gap as #1140, in the other gather entry points.
Reproduced on main at 5f0c1fb, Python 3.12, no model or service:
import asyncio
import art
async def main():
entered, release = asyncio.Event(), asyncio.Event()
effects = []
async def slow_rollout():
entered.set()
await release.wait()
effects.append("finished after gather raised")
return art.TrajectoryGroup([art.Trajectory(reward=1)])
async def failed_rollout():
await entered.wait()
raise RuntimeError("rollout failed")
try:
await art.gather_trajectory_groups([failed_rollout(), slow_rollout()], pbar_desc=None)
except RuntimeError as error:
print("gather raised:", error)
release.set()
await asyncio.sleep(0.1)
print(effects)
asyncio.run(main())
Output:
gather raised: rollout failed
['finished after gather raised']
Expected: []. When the gather raises, the other rollouts should already be cancelled and awaited. gather_trajectories behaves the same way.
The tolerated-failure path (max_exceptions not exceeded) and cancellation of the awaiting task are fine today. asyncio.gather does propagate cancellation to its children; only the exception path leaks.
- 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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenPipe/ART
-
Distributed group_mean casts group ids to float32, losing precision vs non-distributed pathCó thể đã có người làm @OnePunchMonk đã nhận 24 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add from_entity parameter to _experimental_fork_checkpointCó thể đã có người làm @Boulea7 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ruler_score_group drops group exceptions, metadata and metrics, and trajectory policy versionsCó thể đã có người làm @salma2vec đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
trajectory_group_batches leaves started rollouts running after close, error or cancellationCó thể đã có người làm @salma2vec đã nhận 5 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
LocalBackend/Unsloth: gradient_accumulation_steps > 1 hangs the trainer (producer waits for one result per sequence)Có thể đã có người làm @monsterlag đã nhận 6 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
parse names a key after a top-level multi() threshold Bitcoin Core v31.1 refuses as not validĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
btclib-org/btclib-wallet#587 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Judgment-Pack/judgment-pack-spec#275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-generated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue priority: low size: XS
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
yeongseon/azure-functions-doctor-python#651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Changaco/python-libarchive-c#146 ·