Does SageMaker's CreateModel API support model data from versioned S3 objects?

0

In the following AWS CLI invocation, I'm attempting to specify a ModelDataUrl which contains an embedded versionId to reference an object whose bucket has versioning enabled. Does SageMaker's CreateModel API support model data originating from a specific object version? If so, how does one specify the object version?

AWS CLI Invocation:

aws sagemaker create-model --model-name VersionedArtifacts \
  --execution-role-arn arn:aws:iam::<account-id>:role/service-role/<role-name> \
  --primary-container "Image=<account-id>.dkr.ecr.us-east-1.amazonaws.com/<repository>:<tag>,ModelDataUrl=https://s3.us-east-1.amazonaws.com/<versioned-bucket>/versioned-artifacts.tar.gz?versionId=<version-id>

Resulting AWS CLI Error:

An error occurred (ValidationException) when calling the CreateModel operation: Could not find model data at https://s3.us-east-1.amazonaws.com/<versioned-bucket>/versioned-artifacts.tar.gz?versionId=<version-id>.
profile picture
preguntada hace 2 años227 visualizaciones
1 Respuesta
0

I can't rule it out completely as haven't been able to find a source in the docs, but am ~90% sure S3 object versioning is not supported here: Your code makes sense as the only way to try and send through the version parameter, and the missing model data error would make sense if the service is simply trying to read ?versionId=... as part of the key.

I requested further clarification on the ContainerDefinition doc page, but believe you'll need to architect for separate object keys rather than object versions. You'll see that by default the training job API already adds a job-name-specific suffix to your provided output data location, so usually this is only a challenge if you're planning to set up a centralised repository of model.tar.gz in S3 and explicitly copy models into it.

AWS
EXPERTO
Alex_T
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas