-
Notifications
You must be signed in to change notification settings - Fork 871
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
ConcurrentModificationException when doing batch classification for more than one instance #1283
Comments
This is the config file:
No environment variables |
Hi @johann-petrak do you mind trying out this PR and building from source and seeing if it fixes your problem? It worked for me but It'd be great to test it out on more than 1 model #1272 |
Would have loved to try it but the procedure for installation from source requires sudo, insists on changing the global system configuration and is not that easy to adapt because it is not using bash but a python program. Also insists on installing dependencies which are incompatible with the dependencies of what I need in my handler. |
Hmm yeah we need to fix that, would you mind listing the issues you have with our installation script here? #1254 Would be super helpful so I can fix this |
I took a closer look at what those scripts actually try to do and ran those commands relevant to me (or their equivalent) locally, then installed from the pythonbatchtest branch commit 66fe2ec When testing my handler with this version, everything seems to work just fine for submitting a few requests (no heavy load testing was done). |
OK, noticed there were some new commits in the meantime, re-installed from f713d49 |
Thank you for testing, I appreciate it! |
Thank you for your work and the PR, hope it gets reviewed/merged/released soon! |
PR1272 merged |
@lxning any chance of a hotfix release with this? |
Getting the following exception:
This happens when within the maxBatchDelay time, more than one request gets sent to the server. If only one request is sent, everything is fine and I get back the expected array of a single prediction.
The handler is implemented in a way that the method
handle(self, data, context)
returns a list of dicts with as many elements as data contains.Before returning the list of dicts, the following code is also executed:
where
response_content_types
is a list with as many elements as the length of data or the length of the returned list. (in this case, all elements are just 'application/json'The exception seems to indicate some problem in the Java code which I assume should be completely independent of the python code running in the handler (the ConcurrentModificationException in java usually indicates that an element of a collection is removed or added while iterating over the collection, I do not think my handler has anything to do with this).
I therefore assume this is a severe bug in torch serve or, should it be caused by a client problem, definitely not the right way to indicate the client problem by running into such an exception.
The text was updated successfully, but these errors were encountered: