R
Runpod11mo 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
DannyBOP11mo 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. ?
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
DannyB
DannyBOP11mo 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.
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
DannyB
DannyBOP11mo ago
it's ok I mainly wanted to know if that's indeed the case thanks !
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?