ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend
Classification : Implement cron job to update status of jobs/batch
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 10
- Merge medio
- 2g 20h
- PR unite (30g)
- 14
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dagli entry point di Fine-Tuning API e Batch API Retrieve API descritti nell’issue, quindi traccia come lo stato dei job e i risultati vengono archiviati nel database. Definisci il comportamento del worker periodico per entrambi i tipi di job, inclusi gli aggiornamenti dello stato e i risultati recuperati. Il lavoro è completato quando le query al database espongono informazioni aggiornate senza polling manuale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend, database
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100