
Shaun ZhouandClaude Opus 5
744e5fd18a
fix(scripts): push_predictions 的分页与令牌过期
两个在真实环境暴露的 bug:
1. /api/predictions/ 根本不分页——Label Studio 的 REST_FRAMEWORK 没设
DEFAULT_PAGINATION_CLASS,PAGE_SIZE 形同虚设,它一次返回全部预测并忽略 page。
原先按页翻永远不终止,实测翻到第 1798 页才因别的原因报错。改成只请求一次。
2. access token 默认只有 5 分钟(LS 未覆盖 SimpleJWT 默认值),而推上万条预测远超
5 分钟。所有请求统一走 request(),碰到 401 自动用 refresh token 续期后重试一次。
另加 --replace-all:用 Data Manager 的批量操作一次删光项目里所有预测,
比逐条删同版本快得多(适合版本号变了、旧预测留着没用的情况)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 13:17:53 +08:00
..
2026-09-17 16:44:42 +08:00
2026-09-02 21:43:35 +08:00
2026-09-10 12:04:08 +08:00
2026-09-10 12:04:08 +08:00
2026-09-17 11:03:13 +08:00
2026-09-17 16:42:53 +08:00
2026-09-22 13:17:53 +08:00
2026-09-21 11:03:14 +08:00
2026-09-21 11:00:01 +08:00
2026-09-18 15:34:13 +08:00