I'm working on integrating a pre-trained PyTorch model into a Spring Boot application. My aim is to leverage the model's inference capabilities within the REST API exposed by the application. I've searched online but haven't found a clear guide on the best approach. Could someone please provide some guidance or point me toward helpful resources?
Specific Questions:
- Preferred Approach: What's the recommended way to embed a PyTorch model in a Spring Boot application? Are there established libraries or frameworks that streamline the process?
- Serialization/Deserialization: How can I efficiently serialize the PyTorch model for deployment within the Spring Boot application? Are there specific formats or tools preferred for this task?
- Model Serving: Once the model is integrated, how can I create an API endpoint within Spring Boot that accepts input data, feeds it to the model for inference, and returns the predictions?
I want to create a microservice application on Spring Boot, one of the services of which will train the PyTorch neural network model. I have basic knowledge of Spring Boot, RESTful, and the PyTorch model framework.