Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/sagemaker/workflow/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ def __str__(self):
"""Override built-in String function for PipelineVariable"""
raise TypeError(
"Pipeline variables do not support __str__ operation. "
"Please use `.to_string()` to convert it to string type in execution time"
"or use `.expr` to translate it to Json for display purpose in Python SDK."
"If you are trying to use a pipeline variable in an Estimator, Processor or Model "
"object, please make sure the object is built with a PipelineSession object."
"If you are trying to convert a pipeline variable of any type into a pipeline variable "
"of string type, please use `.to_string()` method."
"Use `.expr` method to display the expression structure of the pipeline variable."
)

def __int__(self):
Expand Down
5 changes: 3 additions & 2 deletions src/sagemaker/workflow/model_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ def __init__(
Session.create_model.__name__,
Session.create_model_package_from_containers.__name__,
},
error_message="The step_args of ModelStep must be obtained from model.create() "
"or model.register(). For more, see: https://sagemaker.readthedocs.io/en/stable/"
error_message="The step_args of ModelStep must be obtained from the create method "
"or register method of a Model object and the Model object must be built with "
"PipelineSession. For more, see: https://sagemaker.readthedocs.io/en/stable/"
"amazon_sagemaker_model_building_pipeline.html#model-step",
)
if not (step_args.create_model_request is None) ^ (
Expand Down