Amazon Forecast is a fully managed service that uses statistical and machine learning (ML) algorithms to deliver highly accurate time series forecasts. Released in August 2019, Forecast predates Amazon SageMaker Canvas, a popular low-code, no-code AWS tool for building, customizing, and deploying ML models, including time series forecasting models.
With SageMaker Canvas, you get faster model building, cost-effective predictions, advanced features like model leaderboards and algorithm selection, and enhanced transparency. You can also use the SageMaker Canvas UI, which provides a visual interface for building and deploying models without writing code or requiring ML expertise, or you can use the automated machine learning (AutoML) APIs for programmatic interaction.
This post provides an overview of the benefits that SageMaker Canvas offers and details how Forecast users can migrate their use cases to SageMaker Canvas.
Benefits of SageMaker Canvas
Forecast customers have been asking for more transparency, lower costs, faster training, and more control in building time-series ML models. In response to this feedback, we are now making the next generation of time-series forecasting capabilities available in SageMaker Canvas, which already provides a robust platform for data preparation and building and deploying ML models. With the addition of forecasting capabilities, you now have access to end-to-end ML capabilities for a wide range of model types, including regression, multi-class classification, computer vision (CV), natural language processing (NLP), and generative artificial intelligence (AI), all within SageMaker Canvas’ unified, easy-to-use platform.
SageMaker Canvas has up to 50% faster model building performance and up to 45% faster average forecasts for time series models compared to Forecast on a range of benchmark datasets. Generating forecasts is significantly more cost-effective than Forecast as costs are based solely on the Amazon SageMaker compute resources used. SageMaker Canvas also offers great model transparency by providing direct access to trained models, which can be deployed anywhere. It also provides numerous model insight reports, including access to validation data, model-level and item-level performance metrics, and hyperparameters used during training.
SageMaker Canvas includes key features found in Forecast, such as the ability to train an ensemble of forecasting models using both statistical and neural network algorithms. You create the best model for your dataset by generating a base model for each algorithm, evaluating its performance, and then combining the best-performing models into an ensemble. This approach leverages the strengths of different models to generate more accurate and robust forecasts. You have the flexibility to choose one or multiple algorithms for model creation, as well as the ability to evaluate the impact of model features on forecast accuracy. SageMaker Canvas simplifies data preparation with automated solutions for filling missing values, making the forecasting experience as seamless as possible. With simple UI options or API configurations, you can integrate external information out of the box, such as country-specific holidays. You can also leverage the data flow feature to connect to external data provider APIs and import data, such as weather information. Additionally, you can perform what-if analysis directly in the SageMaker Canvas UI to explore how different scenarios affect your results.
We continue to innovate and deliver industry-leading state-of-the-art forecasting capabilities through SageMaker Canvas with reduced latency, lower training and prediction costs, and improved accuracy, including expanding the range of forecasting algorithms we support and incorporating new advanced algorithms to further enhance the model building and forecasting experience.
Migrating from Forecast to SageMaker Canvas
Today we are releasing a migration package consisting of two resources to help you migrate from Forecast to SageMaker Canvas. The first component includes a workshop to get hands-on experience with the SageMaker Canvas UI and APIs and learn how to migrate from Forecast to SageMaker Canvas. We also provide a Jupyter notebook that shows how to convert an existing Forecast training dataset into the SageMaker Canvas format.
Before learning how to build a forecasting model in SageMaker Canvas using a Forecast input dataset, let’s understand the key differences between Forecast and SageMaker Canvas.
- Dataset types – Forecasting uses multiple datasets: a target time series, related time series (optional), and item metadata (optional). In contrast, SageMaker Canvas requires only one dataset, eliminating the need to manage multiple datasets.
- Calling the model – SageMaker Canvas allows you to invoke a model for a single dataset or a batch of datasets through the UI and API. Unlike Forecast, where you must first create and then query a forecast, you can use the UI or API to generate forecasts by simply invoking an endpoint where your model is deployed. The SageMaker Canvas UI also provides the option to deploy your model for inference on a SageMaker real-time endpoint. With just a few clicks, you receive an HTTPS endpoint that you can call from within your application to generate forecasts.
The following sections provide high-level steps to transform data, build a model, and deploy the model in SageMaker Canvas using the UI or API.
Build and deploy models using the SageMaker Canvas UI
We recommend that you reorganize your data sources to create a single dataset directly for use with SageMaker Canvas. For guidance on how to structure your input datasets for building predictive models in SageMaker Canvas, see Time Series Forecasting in Amazon SageMaker Canvas. However, if you want to continue using multiple datasets as you do with Forecast, you can use the following options to merge them into a single dataset supported by SageMaker Canvas:
- SageMaker Canvas UI – Use the SageMaker Canvas UI to combine the target time series, related time series, and item metadata datasets into one dataset. The following screenshot shows an example dataflow created in SageMaker Canvas to merge three datasets into one SageMaker Canvas dataset.
- Python script – Merge datasets using Python scripting: For example code and hands-on experience converting multiple Forecast datasets into a single dataset in SageMaker Canvas, see this workshop.
Once the datasets are prepared, you will use the SageMaker Canvas UI available in the SageMaker console to load the datasets into a SageMaker Canvas application that uses AutoML to train, build, and deploy a model for inference. In the workshop, we will show you how to merge the datasets and build a predictive model.
After you build a model, there are multiple ways to generate and use predictions.
- Predict in the app – You can generate predictions using the SageMaker Canvas UI and then use built-in integrations to export them to Amazon QuickSight or download the prediction files to your local desktop. You can also access the generated predictions from the Amazon Simple Storage Service (Amazon S3) storage location where SageMaker Canvas is configured to store model artifacts, datasets, and other application data. For more information about Amazon S3 storage locations used by SageMaker Canvas, see Configuring Amazon S3 Storage.
- Deploy the model to a SageMaker endpoint – You can deploy models to SageMaker real-time endpoints directly from the SageMaker Canvas UI. Developers can query these endpoints in their applications with just a few lines of code. You can update the code of your existing applications to call deployed models. For more information, see the workshop.
Build and deploy models using the SageMaker Canvas (Autopilot) API
You can use the sample code provided in the notebook in the GitHub repository to process datasets such as the target time series data, related time series data, and item metadata into a single dataset required by the SageMaker Canvas API.
You then use the SageMaker AutoML API for time series forecasting to process the data, train an ML model, and deploy the model programmatically. For a detailed implementation of how to train a time series model and use the model to generate forecasts, see the sample notebooks in the GitHub repository.
Check out our workshops for a more hands-on experience.
Conclusion
In this post, we outlined the steps to migrate from Forecast to building time-series ML models in SageMaker Canvas, providing a data conversion notebook and prescriptive guidance through a workshop. After migrating, you can benefit from SageMaker Canvas’ more accessible UI, cost efficiency, and increased transparency of the underlying AutoML APIs, democratizing time-series forecasting within your organization and saving time and resources in model training and deployment.
SageMaker Canvas can be accessed through the SageMaker console. Time series forecasting using Canvas is available in all regions where SageMaker Canvas is available. For more information about AWS region availability, see AWS Services by Region.
resource
For more information, see the following resources:
About the Author
Nirmal Kumar He is a Senior Product Manager for Amazon SageMaker services. He is committed to expanding access to AI/ML and leads the development of no-code and low-code ML solutions. Outside of work, he enjoys traveling and reading non-fiction.
Dan Schinreich He is a Senior Product Manager at Amazon SageMaker, focusing on expanding our no-code/low-code offerings. He is passionate about making ML and generative AI more accessible to help solve tough problems. Outside of work, he enjoys playing hockey, scuba diving, and reading sci-fi novels.
Davide Galittelli I’m a Specialist Solutions Architect for AI/ML in EMEA, based in Brussels, working closely with clients across the Benelux. I’ve been a developer since I was little, starting coding at the age of 7. I started learning AI/ML after graduating university and have been hooked ever since.
Viswanath Hole He is a Solutions Architect at Amazon Web Services. He works with customers from the early stages of their AWS adoption and helps them adopt cloud solutions to address their business needs. He is passionate about Machine Learning and loves spending time with his family outside of work.