ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend

Classification : Implement cron job to update status of jobs/batch

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

还没有人认领这个 Issue。

enhancement
主要语言
Python
星标
18
派生
10
平均合并
2 天 20 小时
30 天内合并 PR
14

描述

Problem

Both the Fine-Tuning API and the Batch API in OpenAI run asynchronously. Once a request is created, the job continues processing on OpenAI’s side, and the status only updates when the job progresses (e.g., queued → running → succeeded/failed).

Currently, to know whether a fine-tuning job or batch job has completed, the user must manually call the Retrieve API for each object. This manual polling is tedious, inefficient, and not scalable.

Proposed Solution

  • Set up a cron job (or background worker) that:

  • Periodically calls the Retrieve API for both fine-tuning and batch jobs.

  • Updates the database with the latest job status and results.

  • Ensures that when users query the database, they receive up-to-date information without needing to manually poll OpenAI endpoints.

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 issue 中描述的 Fine-Tuning API 和 Batch API Retrieve API 入口点开始,然后跟踪 job 状态和结果如何存储在数据库中。定义两种 job 类型的周期性 worker 行为,包括状态更新和检索到的结果。完成的标准是数据库查询能够提供当前信息,而无需手动轮询。

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

评估

技术栈
python
领域
api, backend, database
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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