AutoGluon-Cloud lets you train and deploy state-of-the-art ML models for classification, regression, and time series forecasting on Amazon SageMaker. All it takes is a few lines of code; AutoGluon-Cloud handles the infrastructure, dependencies, and glue code for you.
Zero-shot forecasts with a pretrained model — no training required.
fromautogluon.cloudimportTimeSeriesFoundationModel# `data` can be a local path, S3 URL, or pandas DataFramedata="https://autogluon.s3.amazonaws.com/datasets/timeseries/m4_hourly_tiny/train.csv"model=TimeSeriesFoundationModel("chronos-2")# Batch predictionpredictions=model.predict(data=data,target="target",prediction_length=24)# Real-time inference endpointendpoint=model.deploy()predictions=endpoint.predict(data=data,target="target",prediction_length=24)endpoint.delete_endpoint()
Train a classification or regression model on tabular data.
fromautogluon.cloudimportTabularCloudPredictor# `train_data` and `test_data` can be a local path, S3 URL, or pandas DataFrametrain_data="https://autogluon.s3.amazonaws.com/datasets/Inc/train.csv"test_data="https://autogluon.s3.amazonaws.com/datasets/Inc/test.csv"# Traincloud_predictor=TabularCloudPredictor()cloud_predictor.fit(train_data=train_data,predictor_init_args={"label":"class"},# passed to TabularPredictor()predictor_fit_args={"time_limit":120},# passed to TabularPredictor.fit())# Batch predictionresult=cloud_predictor.predict(test_data)# Real-time inference endpointendpoint=cloud_predictor.deploy()result=endpoint.predict(test_data)endpoint.delete_endpoint()
fromautogluon.cloudimportTimeSeriesCloudPredictor# `data` can be a local path, S3 URL, or pandas DataFramedata="https://autogluon.s3.amazonaws.com/datasets/timeseries/m4_hourly_tiny/train.csv"# Traincloud_predictor=TimeSeriesCloudPredictor()cloud_predictor.fit(train_data=data,predictor_init_args={"target":"target","prediction_length":24},# passed to TimeSeriesPredictor()predictor_fit_args={"time_limit":120},# passed to TimeSeriesPredictor.fit())# Batch predictionresult=cloud_predictor.predict(data)# Real-time inference endpointendpoint=cloud_predictor.deploy()result=endpoint.predict(data)endpoint.delete_endpoint()