R
RunPod2mo ago
DannyB

Structure of "job" JSON

I understand that at the very least there is job["id"] and job["input"] and we utilize it. It will help me a great deal if I could send additional information like job["source"] or other metadata to the handler function. It seems like no matter how I structure the JSON, only id and input end up in the job JSON to the handler. Is this indeed the case? I prefer not to force additional metadata inside the input field ... I want a separation between the model's inputs and the handler controllers.
6 Replies
DannyB
DannyBOP2mo ago
Also worth to note that in local tests (python rp_handler.py --test_input "$INPUT") adding extra fields work. It is only when deployed on RunPod endpoints that it seems to not work. ?
nerdylive
nerdylive2mo ago
I think putting extra metadata inside input has been the norm for endpoints in RunPod, but i think if you want that feature to be implemented feel free to add new #🧐|feedback adding extra fields like what? can you explain more about this
DannyB
DannyBOP2mo ago
The thing is it is not model metadata, it is endpoint metadata. I prefer to keep the 2 separate because my model is not deployed only on RunPod. For example I am interested in passing to the endpoint the source of where the request came from. This has nothing to do with the input validation of the actual model, but it changes how the handler will process the results — Choose a different CDN to upload the images, or aggregate metrics for me.
nerdylive
nerdylive2mo ago
yeah i mean any metadata* should be in the input yup, i guess you should add a feedback for it
DannyB
DannyBOP2mo ago
it's ok I mainly wanted to know if that's indeed the case thanks !
nerdylive
nerdylive2mo ago
Your welcome!

Did you find this page helpful?