

# Model cards actions


After you've created a model card, you can manage them. Managing model cards include the following actions:
+ Editing a model card
+ Deleting a model card
+ Exporting a model card to a PDF

You can manage using either the Amazon SageMaker AI console or the SageMaker Python SDK. For more information about using the Python SDK see [Amazon SageMaker Model Cards](https://sagemaker.readthedocs.io/en/stable/api/governance/model_card.html) in the SageMaker Python SDK API reference.

For example notebook using the SageMaker Python SDK, see the *[Amazon SageMaker Model Governance - Model Card](https://github.com/aws/amazon-sagemaker-examples/tree/main/sagemaker_model_governance/model_card.ipynb)* example notebook.

**Topics**
+ [

# Edit a model card
](model-cards-console-edit.md)
+ [

# Export a model card
](model-cards-console-export.md)
+ [

# Delete a model card
](model-cards-console-delete.md)

# Edit a model card


To edit a model card, navigate to the model card of your choice by selecting its name in the Amazon SageMaker Model Card console and choose **Edit**. 

After you save a model card, you cannot edit the name of that model card. After you save a model card version, you cannot update that version of the model card. Any edits that you need to make are saved as a subsequent version in order to have an immutable record of model changes. 

To view different versions of the model card, choose **Actions**, **Select version**, and then choose the version that you want to view.

You can edit a model card using the `model_card.update()` method. Updating a model card creates a new model card version in order to have an immutable record of model changes. You cannot update the name of a model card.

```
my_card.model_overview.model_description = "updated-model-decription"
my_card.update()
```

# Export a model card


Follow these steps to export a model card.

1. Go to the Amazon SageMaker Model Card console.

1. Choose the name of the model card you want to export.

1. In the model card overview, choose **Actions** and then **Export PDF**.

1. Enter an S3 URI or browse available S3 buckets for your model card PDF.

1. If your model card exports successfully, you can either choose **Download PDF** in the resulting banner or download your PDF directly from Amazon S3. 

You can export a model card in the SageMaker Python SDK by specifying an S3 output path and export your model card PDF to it with the following commands:

```
s3_output_path = f"s3://{bucket}/{prefix}/export"
pdf_s3_url = my_card.export_pdf(s3_output_path=s3_output_path).delete()
```

# Delete a model card


Follow these steps to permanently delete one or more model cards.

1. Go to the Amazon SageMaker Model Cards console.

1. Check the box to the left of the name of the card(s) you want to delete.

1. Choose **Delete** in the upper right-hand corner.

1. Confirm your request to permanently delete one or more cards..

You can also delete a model card when viewing the model card overview in the console by choosing **Actions** and then **Delete model card**.

Within the SageMaker Python SDK, you can permanently delete a model card with the following command:

```
my_card.delete()
```