Skip to content

feat: support PG-OPD unified training flow - #198

Merged
luk384090-cloud merged 6 commits into
dashscope:mainfrom
caogaoshuai:feat/pg-opd
Sep 17, 2026
Merged

luk384090-cloud merged 6 commits into
dashscope:mainfrom
caogaoshuai:feat/pg-opd

Conversation

@caogaoshuai

Copy link
Copy Markdown

概述

支持 PG-OPD 统一训练流程,统一 OPD 训练类型值,并修复测试包结构问题。

改动内容

  • feat: 支持 PG-OPD 统一训练流程
    • 增加 pg-opd 训练类型与 teacher_model 请求传递
    • 支持本地数据集自动上传及可选 Rollout/Reward 组件
    • 修正函数启动脚本写入路径并补充示例与回归测试
  • fix: 统一 OPD 训练类型值
    • 将 SDK 请求和示例中的训练类型统一为 pg_opd
    • 更新中英文文档与 OPD 单元测试
  • test: 修复测试包结构
    • 补 tests/init.py 与 tests/unit/init.py,避免被 site-packages 中同名 tests 包遮蔽
    • 修正 setup.py find_packages 的 exclude 写法,防止 tests 进入 wheel

测试

  • 新增 tests/unit/test_opd.py(244 行)与 test_agentic_rl_cli_opd.py 单元测试

劲松 added 4 commits September 17, 2026 11:47
- 增加 pg-opd 训练类型与 teacher_model 请求传递
- 支持本地数据集自动上传及可选 Rollout/Reward 组件
- 修正函数启动脚本写入路径并补充示例与回归测试
- 将 SDK 请求和示例中的训练类型调整为 pg_opd
- 更新中英文文档与 OPD 单元测试
- 补 tests/__init__.py 与 tests/unit/__init__.py:仓库测试从 namespace 目录变
  为正规包,避免被 site-packages 中同名 tests 包遮蔽(本机 2026-09-02 实测:
  环境被装入了带 __init__.py 的 tests 包后,tests.unit.mock_server 无法导入)
- setup.py find_packages 的 exclude=("tests") 裸字符串按字符拆分、实际不排除
  任何包;改为 ("tests", "tests.*"),防止 tests 进入 wheel
- 为 test_opd.py 与 test_agentic_rl_cli_opd.py 补 utf-8 编码声明
- 按仓库锁定的 black 23.3.0(line-length=79)重排两个测试文件
- test_opd.py 增加 redefined-outer-name 豁免(pytest fixture 标准用法)
劲松 added 2 commits September 17, 2026 12:12
- fix-encoding-pragma 钩子会把只含 coding pragma 的文件截断为空,__init__.py 恢复为空文件(pre-commit-hooks v4.3.0 特殊分支)
- add-trailing-comma 钩子要求 AsyncMock 调用补尾随逗号
- --teacher-model 存在性改由 typer get_command 命令模型校验(不再断言渲染文本)
- rich 在不同终端宽度/平台(Linux CI 80 列)会截断或连字符换行 option 名,导致误报
- help 文档散文断言保留,增加 ANSI 剥离
@luk384090-cloud
luk384090-cloud merged commit fbdd654 into dashscope:main Sep 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants