Skip to content
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

Example to demonstrate building a custom endpoint plugin #3306

Merged
merged 6 commits into from
Sep 13, 2024

Conversation

namannandan
Copy link
Collaborator

Description

Add an example to demonstrate building a custom endpoint plugin which reports model ready status to serve inference requests.

Type of change

  • This change requires a documentation update

Feature/Issue validation/testing

  • Readme includes the steps and the outputs seen as a result

```bash
$ cp examples/custom_endpoint_plugin/ModelReady.java plugins/endpoints/src/main/java/org/pytorch/serve/plugins/endpoint
```
Review the utilization of the [TorchServe SDK API](https://github.com/pytorch/serve/tree/master/serving-sdk) in [ModelReady.java](ModelReady.java) to implement the necessary functionality for the HTTP API endpoint.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not clear what this is for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make this more specific and point it to the serving SDK interfaces here: https://github.com/pytorch/serve/tree/master/serving-sdk/src/main/java/org/pytorch/serve/servingsdk and also link to the corresponding implementation: https://github.com/pytorch/serve/tree/master/frontend/server/src/main/java/org/pytorch/serve/servingsdk/impl. As to why this is required, it is useful when writing a custom plugin, see the implementation in the plugin file: examples/custom_endpoint_plugin/ModelReady.java

Copy link
Collaborator

@agunapal agunapal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks!

@namannandan namannandan added this pull request to the merge queue Sep 13, 2024
Merged via the queue into pytorch:master with commit 15952d0 Sep 13, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants