aws / amazon-sagemaker-examples

Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.
https://sagemaker-examples.readthedocs.io
Apache License 2.0
10.18k stars 6.79k forks source link

mxnet gluon recommender batch prediction? #709

Open tosolveit opened 5 years ago

tosolveit commented 5 years ago

Hi, I am able to run and query the endpoint, this model takes a user and multiple items (or single) to get the recommendation scores.

I am not sure how to apply batch predictions like for each user get all the products they haven't seen (or bought, liked), I would really appreciate if you share any architecture approach. Is there a way to do all of this by online inference machines?

mmeidl commented 5 years ago

Hi @tosolveit thank you for your interest in using SageMaker. If you can please provide more details about your use case, we can provide more detailed advice. Some relevant questions I would like to know:

  1. How is your recommender model implemented? Did you use a framework container provided by SageMaker (like sagemaker-mxnet-container)? Or did you build your own custom container with train and serve entrypoints?
  2. How many test examples (user-item pairs) would you expect to process in a single batch prediction? Do you want recommendations for just a few examples, or more than 100 at a time?
  3. What latency or SLA do you expect for batch predictions? Do you need real-time recommendations within milliseconds-to-seconds latency? Or can you afford minutes-to-hours latency for processing a large dataset?

Depending on your requirements, you can use either SageMaker Endpoints or Batch Transform for your inference use case.