teardown¶
- autogluon.cloud.teardown(*, backend: Literal['sagemaker', 'ray_aws'] | None = None, session: Session | None = None) None[source]¶
Delete a backend’s CloudFormation stack and remove its config entry.
With
backend=None(default), tears down every configured backend and removes the config file. Withbackend="sagemaker", tears down just that one and leaves any other backends in the config.The S3 buckets are not emptied for you: CloudFormation refuses to delete a non-empty bucket, so you must remove their contents (e.g. via
aws s3 rm s3://<bucket> --recursive) before callingteardown(). This is intentional — buckets may contain training artifacts or model weights that are expensive to recreate.- Parameters:
backend – Which backend to tear down.
None(default) tears down all configured backends.session – A
boto3.Sessionto use for AWS calls. IfNone, a default session is built from the standard credential chain, with each backend’s saved region applied automatically.