elastic / ml-cpp

Machine learning C++ code
Other
149 stars 62 forks source link

[ML] Catch any exception thrown by inference #2680

Closed davidkyle closed 2 months ago

davidkyle commented 2 months ago

The pytorch_inference process must respond to every request as the Java side is waiting for a response. Partly this is ensured by a try catch block, we can't be certain what types of exception might be thrown so better to catch the base std::exception rather than derived classes.