How to Get the Progress of the Processing job in serverless ?
When I use status/id, it only return like {delayTime: 873, id: 3e9eb0e4-c11d-4778-8c94-4d045baa99c1-e1, status: IN_PROGRESS, workerId: eluw70apx442ph}, no progress data.
I want progress data just like screenshot on serverless console log。Please tell me how to get it in app client.

6 Replies
Additional controls | RunPod Documentation
Send progress updates during job execution using the runpod.serverless.progress_update function, and refresh workers for long-running or complex jobs by returning a dictionary with a 'refresh_worker' flag in your handler.
Thank you
Can you supply a real project code ? Document is so simple, I can't follow it. In real project,I don't know how long each step will take. Code like " for update_number in range(0, 3):
runpod.serverless.progress_update(job, f"Update {update_number}/3") " will not work .
You can just put below code in your handler.py file, no need to know total how many steps.
runpod.serverless.progress_update(job, f"Finish step 1") "
runpod.serverless.progress_update(job, f"Finish step 2") "
runpod.serverless.progress_update(job, f"Finish step 3") "
My requirement is to generate only one photo each time. For the progress updates, I need the system to send a progress update after each step during the generation of a single photo. If generating one photo takes 30 steps, I expect an update after each step so that the client can display the progress as N / 30.
with self.progress_bar(total=num_inference_steps) as progress_bar:
for i, t in enumerate(timesteps): runpod.serverless.progress_update(job, f"Finished step {i + 1} / {len(timesteps)}") . Maybe I should put it here, at the end of each step execution?
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
thanks