Skip to content

Automation of Model Retraining and Inference in SageMaker Canvas vs. SDK (AutoMLv2)

0
  1. Is it possible to automate the entire workflow of a model built in SageMaker Canvas — including retraining the model, connecting it to S3 for automatic inference, and checking the results (e.g., via batch execution)? Or does a person have to manually go back into Canvas each time retraining is needed, click through the interface, and upload the inference file manually?

  2. When using from sagemaker.automl.automlv2 in the Python SDK, is it possible to build a model from scratch exactly as done in Canvas? Also, can the models built through this method be automated for retraining and inference in a batch process?

asked a year ago172 views

1 Answer
0

When comparing automation capabilities between SageMaker Canvas and the Python SDK:

  1. SageMaker Canvas Automation:
  • SageMaker Canvas does not automatically rebuild models when datasets are updated. Each dataset update creates a new version, but you need to manually rebuild the model with the new data.
  • You can set up automatic batch predictions that run whenever your dataset is updated. This allows your existing model to generate new predictions on updated data without rebuilding the model.
  • To set up automatic batch predictions in Canvas, you navigate to your model, select the Predict tab, choose Batch prediction, select Automatic, and configure the dataset for automation.
  • These automations only run while you're logged into the Canvas application and pause when you log out.
  • There's a limit of 20 automatic configurations in Canvas.
  1. Python SDK Automation:
  • For more comprehensive automation, you can use the SageMaker Python SDK to create automated ML workflows.
  • You can use Amazon SageMaker Pipelines with AutoMLStep to create end-to-end automated workflows.
  • The AutoML API allows you to create AutoML jobs that automatically train models.
  • You can set up a complete automated retraining framework using AWS Step Functions, CloudTrail, and CloudWatch Events to detect new training data and initiate retraining tasks.
  • SageMaker Pipelines can orchestrate the entire process from data preparation to model deployment.
  • The SDK approach offers more flexibility for automation compared to Canvas, allowing you to build complete CI/CD pipelines for your ML models.

The Python SDK approach provides more comprehensive automation capabilities for the entire ML lifecycle, while Canvas offers some limited automation features primarily focused on batch predictions rather than model retraining.
Sources
MLPER-16: Establish an automated re-training framework - Machine Learning Lens
if sagemaker dataset gets a new version automatically, does the model automatically rebuild? | AWS re:Post
Make automatic batch predictions - Amazon SageMaker AI
Add a step - Amazon SageMaker AI

answered a year ago

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.