RunpodR
Runpod14mo ago
5 replies
tzk

How to get progress updates from Runpod?

Hi all - my goal is to get progress updates from a job request - presently I'm polling a job status request every two seconds, and I would like to get feedback of the % completed.

Looking through the documentation, I'm updated the handler function in rp_handler.py by adding the following code:

for update_number in range(0, 100):
runpod.serverless.progress_update(job, f"{update_number}")
return {"progress": update_number}


I was expecting a new key "progress" in my status request response body - but it's not there? What should I be doing - perhaps have I misunderstood the documentation?

Here is the request status:

{
  "headers": {},
  "ok": true,
  "redirected": false,
  "status": 200,
  "statusText": "",
  "type": "cors",
  "url": "https://api.runpod.ai/v2/qoepgisqx0u3qy/status/1896d710-4f48-4e71-ba2d-f30e47c6f940-u1",
  "body": {},
  "bodyUsed": false,
  "data": {
    "delayTime": 9070,
    "executionTime": 256,
    "id": "1896d710-4f48-4e71-ba2d-f30e47c6f940-u1",
    "output": "0",
    "status": "IN_PROGRESS",
    "workerId": "smjcwth8e5sqvv"
  }
}
Was this page helpful?