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

[Phase 16] S4 — Dependency-range truth for the six advertised trainers

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
huggingface, python

调研方向

Start with the roadmap plan at docs/roadmap/phase-16-trust-surface-hardening.md lines 385-414, then find where the trainer_type enum is consumed and where the TRL imports happen. The change adds a _import_trl_symbol resolver with an trl.experimental fallback, and routes the four reward paths in forgelm/grpo_rewards.py through _completion_text(). Done means all six trainer types construct args and trainers at the declared minimum and current TRL versions with zero skips under pytest -rs, and the reward parity matrix passes.

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

描述

phase: 16 source: roadmap

Roadmap · Phase 16, step S4 · size L · 2 unit(s) · planned in docs/roadmap/phase-16-trust-surface-hardening.md:385-414

Summary

README, the site and the trainer_type enum advertise six alignment methods and both of TRL's data formats; the declared dependency contract delivers neither. ORPOConfig, CPOConfig, ORPOTrainer and CPOTrainer are absent from the top-level trl namespace across the whole declared trl>=1.0.0,<2.0.0 range (checked on the 1.0.0, 1.7.1 and 1.9.2 wheels), so pinning an upper bound cannot fix it. Separately, TRL hands conversational completions to custom rewards as message lists, and all four built-in reward paths assume str.

Units

Unit Tracked by (October 2026 review)
F-W20260729-GAP-03 #105 · #106
F-W20260729-CORE-02 #476 · #708

Decisions this step executes

  • C-10 — ORPO / SimPO on a dependency range that exports neither: route through trl.experimental.

Plan

  • Add a version-aware _import_trl_symbol resolver that falls back to trl.experimental.orpo / trl.experimental.cpo, logs one INFO line per fallback naming the instability, and raises an actionable config-error-shaped failure naming the installed trl.__version__ when neither location works. Never set TRL_EXPERIMENTAL_SILENCE (a silent import fallback).
  • Add _completion_text() to forgelm/grpo_rewards.py as the single canonicalisation point, with a documented policy, and route all four reward paths through it. Never str(list).

Exit criteria

  • All six trainer_type values construct training args and a trainer at both the declared minimum and the resolver-current endpoint with zero skips (asserted with pytest -rs).
  • A missing advertised trainer class fails; it never pytest.skip()s.
  • A parity matrix proves f(['…']) == f([[{'role':'assistant','content':'…'}]]) for all four reward paths, and flat-string outcomes are byte-identical to the baseline.
  • Two real dependency resolutions (declared minimum and current endpoint) run in CI with the zero-skip assertion enforced.

How to deliver

  • One root-cause family, committed on its own; then an Opus review round and a Sonnet review round, each with verified findings fixed and committed before the next step begins.
  • A reproducer that is red before the fix and green after; the full gauntlet from CLAUDE.md passes under ./.venv/bin/python.
  • Every English documentation edit ships with its Turkish mirror in the same commit; a new or renamed audit event gets its EN and TR catalog rows in the same PR.
  • A step that grows a deferred module carries its budget_history justification in the same diff; a widened guard rolls out non-strict first, then flips.
  • Commit bodies cite Absorbs F-W20260729-…; the CHANGELOG [Unreleased] section gets an entry only for a change a user or library consumer can observe (decision C-20).

Planned in docs/roadmap/phase-16-trust-surface-hardening.md (read at f94595f). Unit IDs (F-W20260729-…) come from the 2026-07-29/30 full-project review; the issue numbers next to them are the October 2026 review's records of the same defects.

主要语言
Python
星标
9
派生
1
平均合并
17 小时 14 分钟
30 天内合并 PR
17

环境准备

从这里开始

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

HodeTech/ForgeLM 的其他 Issue

查看 HodeTech/ForgeLM 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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