Skip to content

Batch predictions with SageMaker

0

Hello! I have read tons of documentation but still not clear for me. My use case is: I have trained a model in SageMaker Canvas, then, imported to SageMaker Studio, approved it and now I need to make predictions in batches in an automatic way. Can you please, guide me? I appreciate your help!

1 Answer
-1

Certainly! I'd be happy to guide you through the process of making automatic batch predictions with your SageMaker model. Here's a step-by-step approach based on your use case:

  1. Since you've already trained your model in SageMaker Canvas and imported it to SageMaker Studio, you're off to a great start.

  2. For automatic batch predictions, you'll want to set up a configuration that runs whenever your specific dataset is updated. This is perfect for scenarios where you have regular updates to your data and need predictions to be generated automatically.

  3. To set this up, follow these steps in SageMaker Canvas:

    • Go to the "My models" section in the left navigation pane
    • Select your imported model
    • Choose the "Predict" tab
    • Select "Batch prediction"
    • For "Generate predictions", choose "Automatic"
    • In the "Automate batch predictions" dialog box, select the dataset you want to use for predictions
    • Choose "Set up" to confirm the configuration
  4. Once set up, Canvas will run a batch predictions job for your dataset. It will then automatically run another job every time your dataset is updated, either manually or through an automated process.

  5. After each prediction job finishes, you can find the output dataset with your results on the "Run predictions" page under "Predictions". You can preview the output data, which will show the input data matched to the prediction and the probability of the prediction being correct.

  6. You can download these results for further analysis or integration with other systems.

  7. It's important to note that you can set up a maximum of 20 automatic configurations in Canvas.

  8. If you need more control or want to manage your automatic batch predictions through code, you can use the SageMaker APIs. This involves creating a model using the CreateModel API and then setting up a transform job using the CreateTransformJob API.

  9. For monitoring and management, you can use the "Automations" page in Canvas to view your automated batch predictions job history or make changes to your automatic configuration.

By following these steps, you should be able to set up automatic batch predictions for your SageMaker model, allowing for efficient and regular predictions on your updated datasets.
Sources
Make automatic batch predictions - Amazon SageMaker
Batch predictions in SageMaker Canvas - Amazon SageMaker
Run batch inference jobs - Amazon SageMaker AI

answered 10 months ago
  • Not sure if the UI changed, I'm not able to find the Automatic option for batch predictions in Canvas. Also, what I meant with automatic batch predictions was that I'll have an updated CSV to make predictions with everyday, I also need the predictions output somewhere I don't need to manually download them. Thanks!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.