R
RunPod3mo ago
abtx

How do I write handler for /run

When I create a handler runpod.serverless.start({"handler": async_generator_handler}) Only http://localhost:8000/runsync triggers async_generator_handler However when posting against http://localhost:8000/run async_generator_handleris not triggered. Just returns
{"id":"test-20023617-4048-4f73-9511-8ae17a1ad7a5","status":"IN_PROGRESS"}
{"id":"test-20023617-4048-4f73-9511-8ae17a1ad7a5","status":"IN_PROGRESS"}
But nothing happens in the backend
6 Replies
justin
justin3mo ago
Local testing for runpod isn't that good. You write a handler just as a normal function Just you can really only test the /status to see the response when live Your best bet is just test with run-sync locally and if run-sync works, your /run will work
justin
justin3mo ago
GitHub
GitHub - justinwlin/runpodWhisperx: Runpod WhisperX Docker Containe...
Runpod WhisperX Docker Container Repo. Contribute to justinwlin/runpodWhisperx development by creating an account on GitHub.
GitHub
GitHub - justinwlin/runpod_whisperx_serverless_clientside_code: Hel...
Helper functions for Runpod to automatically poll my WhisperX API. Can be adapted to other use cases - justinwlin/runpod_whisperx_serverless_clientside_code
justin
justin3mo ago
Examples of my own runpod stuff / clientside code that i use to call the endpoint if you want examples
justin
justin3mo ago
If you do want to use stuff async, I have an example here: https://github.com/justinwlin/Runpod-OpenLLM-Pod-and-Serverless/blob/main/handler.py
GitHub
Runpod-OpenLLM-Pod-and-Serverless/handler.py at main · justinwlin/R...
A repo for OpenLLM to run pod. Contribute to justinwlin/Runpod-OpenLLM-Pod-and-Serverless development by creating an account on GitHub.
abtx
abtx3mo ago
Thank you so much! I reported the bug on GitHub: https://github.com/runpod/runpod-python/issues/304
GitHub
Async /run does not work when testing locally · Issue #304 · runp...
Describe the bug When I create a handler runpod.serverless.start({"handler": async_generator_handler}) Only http://localhost:8000/runsync triggers async_generator_handler However when pos...
flash-singh
flash-singh3mo ago
@Merrell
Want results from more Discord servers?
Add your server
More Posts
How do indicated job status in a handler?For example in https://docs.runpod.io/serverless/workers/handlers/handler-async ``` import runpod imA6000 serverless worker is failing for an unknown reason.In the last week a few of our serverless workers have been failing on all requests. Trying to narrowCan multiple models be queried using the vllm serverless worker?Just getting started with the vllm serverless worker and my first question is can I query multiple mDidn't get response via email, trying my luck hereHi, we've reached out to you via email to maybe setup a meet and didn't get a response. We need yourtorch.cuda.is_available() is FalseSpinning up several H100s (burning money 😅) and no matter which official docker image I use, `torchNumber of requests per secondHello! Can you clarify about the number of requests per second? Here (https://docs.runpod.io/serverlUserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cudaThis is a reocurring problem on RunPod. This time with 3090 -- tried 3 different pods in CA region I shouldnt be getting charged for this error.Only lost 30cents so far so its not a big deal but if I wasnt paying attention, this could have easiLatest version of Automatic1111 in 'RunPod Automatic1111 Stable Diffusion Template t 'is there a way to update to the latest version of Autometic1111 in 'RunPod Automatic1111 Stable DiffInconsistent delay time with generator workerI am getting very inconsistent delay times when running serverless with a generator handler. I have