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
Fail validate when converting to numpy array in transformer #2291
Comments
@eyalcha transformer needs to send the request to predictor over the wire so I think it still needs to convert to a list according to the protocol right? |
@yuzisun the issue is here : kserve/python/kserve/kserve/model.py Line 78 in c75e526
If we need to convert to numpy array and then send to predict (with REST V1/V2), the validate function in transformer will fail.
The assumption is that we need to convert the instances to array before sending it to predict. Before issue #1972 it was done in predictor, in the predict function with no validation. Now it was moved to pre process of transformer and the validate function fails because of the type change. Am I missing something? |
@eyalcha Can you provide a more detailed example for the issue ? As I understand sklearn predict is able to convert to either numpy or pandas data framework accordingly. |
The validation is only done when the input is a dict type, you can pass the np array to the predict function. kserve/python/kserve/kserve/model.py Line 160 in 09f5f60
|
/kind bug
Issue #1972 removed np.array check and now conversion should be done in transformer (which is the correct approach).
The issue is that currently when converting to np.array it fails in validate function in transformer because it is not a list
kserve/python/kserve/kserve/model.py
Line 109 in aefac29
The text was updated successfully, but these errors were encountered: