3 Answers
- Newest
- Most votes
- Most comments
1
That is correct. Figured that. Looks like one to call that API is to have LambaStep
and chain it after RegisterModel
step . Here is lambda implementation. Feels a bit heavy workaround for this objective. So let me know if there is a better /lighter way to achieving the same. Thanks.
sagemaker_client = client = boto3.client("sagemaker")
def lambda_handler(event, context):
print(boto3.__version__)
logger.info(f"Received Event: {event}")
logger.info(f"Boto version: {boto3.__version__}")
model_arn = event['model_arn']
model_arn = 'arn:aws:sagemaker:us-east-1:ACCOUNT:model-package/model_package_name/version'
response = client.describe_model_package(
ModelPackageName=model_arn
)
help(client.update_model_package)
response = client.update_model_package(
ModelPackageArn=model_arn,
ModelApprovalStatus=response['ModelApprovalStatus'],
CustomerMetadataProperties={'string': 'string'},
)
return {"statusCode": 200, "body": json.dumps("Model metadata updated successfully")}
answered 3 years ago
The only problem with approach getting registered model ARN in SageMaker pipelines. It is buried somewhere in
RegisterModel
step, but I can't seem to figure out how to extract it. However, SM Studio does access it and shows in UI as step output.
0
Hi,
You can use the UpdateModelPackage API to update custom metadata properties on an already registered model package whether it's in a pipeline or not.
answered 3 years ago
Relevant content
- Accepted Answerasked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago
Perfect timing. This support got added 2 days ago! Thanks for pointing to it.