ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend
Classification : Implement cron job to update status of jobs/batch
还没有人认领这个 Issue。
- 主要语言
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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