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
gefragt vor 2 Jahren2555 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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
beantwortet vor 2 Jahren
  • This sounds great. Is there any documentation regarding the internal structure of the gzip file?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen