-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Pending informationcomponent: hostingRelates to the SageMaker Hosting PlatformRelates to the SageMaker Hosting Platformcomponent: modelRelates to SageMaker ModelRelates to SageMaker Modeltype: bug
Description
Describe the bug
Create a model without specifying sagemaker_session and you get this error
To reproduce
model = Model(
image_uri = "246618743249.dkr.ecr.us-west-2.amazonaws.com/sagemaker-scikit-learn:0.23-1-cpu-py3",
model_data = my_model_data_url,
role = role_arn,
source_dir = s3_url_to_targz,
entry_point= "encoder.py"
)
model_step = CreateModelStep(
name="createmodel",
model = model,
inputs = CreateModelInput(instance_type = "ml.m5.large")
)
pipeline = Pipeline(name="pipeline1", steps=[model_step])
pipeline.upsert(role_arn=role_arn)
pipeline.start()
if you add sagemaker_session = Session()
to Model() it magically works
Expected behavior
work without specifying sagemaker_session
Screenshots or logs
request_dict = self.model.sagemaker_session._create_model_request(
AttributeError: 'NoneType' object has no attribute '_create_model_request'
System information
A description of your system. Please provide:
- SageMaker Python SDK version: latest
- Framework name (eg. PyTorch) or algorithm (eg. KMeans): any
- Framework version: any
- Python version: 3.8
- CPU or GPU: any
- Custom Docker image (Y/N): N
Additional context
Add any other context about the problem here.
chrislemke, niklas-palm, deeDude, kpms-ignacio-traverso, timxieICN and 6 more
Metadata
Metadata
Assignees
Labels
Pending informationcomponent: hostingRelates to the SageMaker Hosting PlatformRelates to the SageMaker Hosting Platformcomponent: modelRelates to SageMaker ModelRelates to SageMaker Modeltype: bug