Can't register a model in model registry without specifying inference_instances
and transform_instances
#3222
Labels
inference_instances
and transform_instances
#3222
Describe the bug
Registering a model using SageMaker SDK
model.register()
without specifyinginference_instances
andtransform_instances
fails with the following error:The same operation via boto3,
sagemaker_client.create_model_package()
instead completes successfully.I traced the issue to these two lines of code:
sagemaker-python-sdk/src/sagemaker/session.py
Lines 4502 to 4503 in 9369a87
When
inference_instances
andtransform_instances
areNone
inmodel.register()
, they should not be included at all to theinference_specification
dictionary.To reproduce
The bug can be reproduced running this code block in a SageMaker (studio) notebook:
Expected behavior
I would expect the model to be registered
Screenshots or logs
this is the error returned when running the code block above
System information
A description of your system. Please provide:
2.99.0
Any
Any
3.8
Any
N
Additional context
The text was updated successfully, but these errors were encountered: