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_handler
is not triggered. Just returns
But nothing happens in the backend6 Replies
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
https://github.com/justinwlin/runpodWhisperx
https://github.com/justinwlin/runpod_whisperx_serverless_clientside_code
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
Examples of my own runpod stuff / clientside code that i use to call the endpoint if you want examples
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.
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...
@Merrell