Training only processes one trajectory at a time?
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
从所引用行的 src/art/preprocessing/inputs.py 开始,跟踪轨迹如何变成训练序列。使用报告中的训练循环和日志,将这一路径与 per_device_train_batch_size 配置进行比较。完成标准是确定一次处理一个样本是否是有意为之;如果不是,则让已配置的 batching 行为正常工作,或记录其理由。
由索引模型根据 Issue 内容生成。
描述
I'm running the training loop with this code, and noticed the trainer only processes one trajectory at a time.
for step in range(TRAINING_STEPS):
print(f"Step {step+1} rollout")
train_groups = []
for scenario in scenarios:
trajectories = await rollout(model.name, vllm_url, scenario)
rewards = [traj.reward for traj in trajectories]
print(f"\n{scenario['id']} rewards: {rewards}")
train_groups.append(art.TrajectoryGroup(trajectories))
print(f"Step {step+1} training")
await model.delete_checkpoints()
await model.train(train_groups, config=art.TrainConfig(learning_rate=1e-5))
(APIServer pid=1156) Step 19 rollout
(APIServer pid=1156) ....................................................................................................................................................................................
(APIServer pid=1156) s1 rewards: [0.41975308641975306, 0.012345679012345678, 0.1851851851851852, 0.654320987654321, 0.19753086419753085, 0.3950617283950617, 0.1358024691358025, 0.6172839506172839]
(APIServer pid=1156) Step 19 training
(APIServer pid=1156) No "val/reward" metric found in history
(APIServer pid=1156) Deleted checkpoint art/art-rl/models/qwen3-14b-rl/checkpoints/0017
(APIServer pid=1156) Packed 118 trajectories into 118 sequences of length 6144
train: 100%
118/118 [08:05<00:00, 4.02s/it, loss=0.0146, grad_norm=2.29, policy_loss=0.0146, entropy=0.0266]
This seems to be aligned with the code in inputs.py, which bypasses per_device_train_batch_size config.
Is there a reason to limit to one sample at a time?
- 主要语言
- Python
- 星标
- 10.8k
- 派生
- 989
- 平均合并
- 11 小时 38 分钟
- 30 天内合并 PR
- 104
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenPipe/ART 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 3 天内回复
-
难度 4/5 3-5 天 新手友好度 54/100
维护者通常 3 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 3 天内回复
-
难度 5/5 一周以上 新手友好度 10/100
维护者通常 3 天内回复
-
难度 5/5 一周以上 新手友好度 42/100
维护者通常 3 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
gradio-app/gradio#13895 ·
维护者通常 1 天内回复
-
build-error
难度 2/5 1-3 小时 新手友好度 76/100
spack/spack-packages#6713 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
ActivityWatch/activitywatch#1464 · 1 个 reaction ·
维护者通常 1 天内回复
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search results未关闭
难度 2/5 1-3 小时 新手友好度 78/100
bytedance/trae-agent#483 ·
维护者通常 1 天内回复