Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Training only processes one trajectory at a time?

未关闭
#533 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

从所引用行的 src/art/preprocessing/inputs.py 开始,跟踪轨迹如何变成训练序列。使用报告中的训练循环和日志,将这一路径与 per_device_train_batch_size 配置进行比较。完成标准是确定一次处理一个样本是否是有意为之;如果不是,则让已配置的 batching 行为正常工作,或记录其理由。

由索引模型根据 Issue 内容生成。

描述

question

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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenPipe/ART 的其他 Issue

查看 OpenPipe/ART 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。