Race condition with named model pool initialization. #5191
Labels
Awaiting User Input
Awaiting author to supply further info (data, model, repro). Will close issue if no more info given.
P0
Priority of the issue for triage purpose: IMPORTANT, needs to be fixed right away.
System information
Issue
Changed my call to AddPredictionEnginePool in my ASP.net Core app to use a model name and updated my Predict function to load the named model.
Calling the API with more than one prediction request at once started causing the API to crash.
The PredictionEnginePool should have been able to handle multiple requests at once, as it did with the default pool. Adding a call on API startup to get the prediction engine for that name and returning works as a workaround (or adding a lock around the Predict call), but should the named pools not be initialized on startup like the default pool is? Or provide the option to perform that initialization automatically or warn in the documentation that the named pools aren't thread safe on the first call.
Source code / logs
Please paste or attach the code or logs or traces that would be helpful to diagnose the issue you are reporting.
The text was updated successfully, but these errors were encountered: