Accessing SageMaker model after registering it

0

I can easily create and version a model using SM model registry: https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-version.html

After registering the model, it is also possible to access the metadata: https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html but I do not understand how to programmatically access the internal of the model.

For example, I would like to manually inspect the weights of the last layer of my neural network. A model that I registered last week but that I do not have available on my machine anymore.

AWS
myname
已提问 2 年前2557 查看次数
1 回答
1
已接受的回答

You can use describe_model_package to get the description of the specified model package.

In the response, in ModelDataUrl parameter you'll find the Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).

You can download this file and unzip it. Inside will be the model files, as output of the training.

You can check this example notebook in which we show how to use Amazon SageMaker to train a Scikit-learn Random Forest model, register it in Model Registry, and run a Batch Transform Job.

profile pictureAWS
已回答 2 年前
  • This sounds great. Is there any documentation regarding the internal structure of the gzip file?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则