Comments (6)
Is this the functionality you are looking for? Worker | Local API Server Introduced with runpod-python 0.10.0
from runpod-python.
Yes, this is what I was looking for. I did give it a try but got an error message that made me assume that this required a test file. If that's not the case, I'm not sure exactly why this is happening. When I run python your_handler.py --test_input '{"input": { ... some input }}
it works fine, but with the --rp_serve_api
, I get the following error outputted in a infinite loop:
python runpod_handler.py --rp_serve_api
...
ERROR | Error while getting job: 'NoneType' object has no attribute 'get'
WARN | RUNPOD_WEBHOOK_GET_JOB not set, switching to get_local
WARN | test_input.json not found, skipping local testing
ERROR | Error while getting job: 'NoneType' object has no attribute 'get'
WARN | RUNPOD_WEBHOOK_GET_JOB not set, switching to get_local
WARN | test_input.json not found, skipping local testing
ERROR | Error while getting job: 'NoneType' object has no attribute 'get'
...
Stack trace:
Traceback (most recent call last):
File "/home/user/runpod_handler.py", line 13, in <module>
runpod.serverless.start({"handler": handler})
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/site-packages/runpod/serverless/__init__.py", line 75, in start
asyncio.run(work_loop.start_worker(config))
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
self.run_forever()
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
self._run_once()
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
handle._run()
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/site-packages/runpod/serverless/work_loop.py", line 50, in start_worker
job: Optional[Dict[str, Any]] = await get_job(session, config)
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/site-packages/runpod/serverless/modules/job.py", line 48, in get_job
next_job = _get_local()
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/site-packages/runpod/serverless/modules/job.py", line 22, in _get_local
log.warn("test_input.json not found, skipping local testing")
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/site-packages/runpod/serverless/modules/logging.py", line 59, in warn
log(message, 'WARN')
File "/home/user/mambaforge/envs/tensorml/lib/python3.9/site-packages/runpod/serverless/modules/logging.py", line 29, in log
print(f'{level}| {message}', flush=True)
KeyboardInterrupt
from runpod-python.
What version of the SDK are you using?
from runpod-python.
I'm currently on 0.9.12
, which is what pip installed by default. Not sure if that's something on my side or not, as I see there are newer versions out. Does it install the newest version for you?
from runpod-python.
For the new versions, you will need python 3.10+. We are working on expanding backward compatibility.
from runpod-python.
Thanks, that was it. Definitely a little pain to upgrade the default python version on VMs, so supporting older versions would be useful!
from runpod-python.
Related Issues (20)
- using Multiple GPU for LLM model HOT 1
- Question about rp_metrics HOT 2
- CLI Feature Tracker HOT 1
- Support Container Registry Auth in create_template HOT 2
- Ability to consume `stream` endpoint using iterators
- How to pass variable and files from local HOT 3
- Can't import when running on a read-only filesystem
- Resume_pod command giving error HOT 2
- Fail to install together with awscli due to the `colorama` dependency HOT 4
- Job stuck in IN_QUEUE status after sending progress update HOT 13
- 404 and Unauthorized API Errors HOT 3
- Not able to install runpod and diffusers together using Poetry HOT 4
- Small typo in the readme file, it says start_pod but it seems the command was updated to resume_pod
- Remove "test-" prefix from the job id HOT 1
- Support "/run" in local dev HOT 1
- GPU availability check before deployment HOT 2
- Can't set bucket name in rp_upload.upload_image
- enable webhooks for local testing of serverless workers
- Implement methods for credentials and template creation
- `BUCKET_ENDPOINT_URL` must contain region otherwise URL signing process fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runpod-python.