Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

single item inference request fails #273

Open
aleksandersumowski opened this issue Jun 24, 2020 · 3 comments
Open

single item inference request fails #273

aleksandersumowski opened this issue Jun 24, 2020 · 3 comments
Labels
Type: Enhancement New feature or request

Comments

@aleksandersumowski
Copy link

This project is marked as deprecated, yet still seems to be used for sklearn model hosting in Sagemaker. The default_input_fn when parsing csv input calls squeeze on the parsed result:

array = np.array([row for row in reader]).squeeze()

That causes inferences with just single item to fail as the input array becomes 1D instead of 2D

@laurenyu
Copy link
Contributor

we are working with the team that owns the scikit-learn images to have them migrate to https://github.com/aws/sagemaker-inference-toolkit

The updated implementation looks to not make this squeeze() call: https://github.com/aws/sagemaker-inference-toolkit/blob/master/src/sagemaker_inference/decoder.py#L43-L57

@laurenyu laurenyu added the Type: Enhancement New feature or request label Jul 22, 2020
@aleksandersumowski
Copy link
Author

Thanks for the response! Is there any timeline for the migration?

I guess it's still useful to keep the issue open for the time being in case someone has a similar issue in the meantime

@laurenyu
Copy link
Contributor

Is there any timeline for the migration?

Sorry, I've reached out to the team, but don't have any timeline to share at this time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants