ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend
Classification : Implement cron job to update status of jobs/batch
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18
- Forks
- 10
- Ø Merge
- 2 T. 20 Std.
- Gemergte PRs (30 T.)
- 14
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den im Issue beschriebenen Einstiegspunkten der Fine-Tuning API und der Batch API Retrieve API und verfolge anschließend, wie der Job-Status und die Ergebnisse in der Datenbank gespeichert werden. Definiere das Verhalten des periodischen Workers für beide Job-Typen, einschließlich Statusaktualisierungen und abgerufener Ergebnisse. Als abgeschlossen gilt die Arbeit, wenn Datenbankabfragen aktuelle Informationen ohne manuelles Polling bereitstellen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, backend, database
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100