-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When is initialize method called? #2801
Comments
|
Thanks. I think 2-3 might be the other way around? Like
|
@InakiRaba91 sorry for my typo. you are right about 2-3. |
Then I'd suggest adding a comment in the code to explain this since it's not trivial to infer without prior knowledge. I've submitted this tiny PR to add it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📚 The doc issue
I've created a custom handler with the following initialize method
I spin up the server using a single runner by running
torchserve --start --ncs --ts-config model-store/config.properties
, where config.properties looks like:I notice the "Got here" logs don't show up during the initial phase, where I assumed the model was loaded. Instead, they show up when I submit the first request to the server (
curl -X POST http://localhost:8080/predictions/animal -T ./data/cats_and_dogs/frames/2.png
), but not for subsequent requests. And there's no sleep time in between the two prints.My assumption is that printing the logs is somehow cached? I'd like to know if there's a diagram to better understand the flow.
I noticed too that in the model_service_worker, there seem to be two routes for handling incoming requests based on this branching. Can somebody explain what is the distinction between cmd == b"I" and cmd == b"L"?
Suggest a potential alternative/fix
Including a diagram/explanation with the spin-up flow in the documentation
The text was updated successfully, but these errors were encountered: