Sagemaker Pipeline strange warning message

0

Using Sagemaker's Python SDK 2.11 when I run my pipeline, I see this strange warning message:

/personal_dir/lib/python3.8/site-packages/sagemaker/workflow/pipeline_context.py:233: UserWarning: Running within a PipelineSession, there will be No Wait, No Logs, and No Job being started.

Before, I ran the exact same pipeline script with LocalPipelineSession without any problems and without any kind of weird warning messages.

This is how I am creating the PipelineSession object:

def get_session(region, default_bucket):
    boto_session = boto3.Session(region_name=region)
    sagemaker_client = boto_session.client("sagemaker")

    return PipelineSession(
        boto_session=boto_session,
        sagemaker_client=sagemaker_client,
        default_bucket=default_bucket
    )

Im getting the region in the following way:

import boto3

region = boto3.Session().region_name

I have tried to search the web for the meaning of that warning message, but could not find anything. What does that warning message means?? Am I doing something wrong and what can I do to make that warning disapear

2 Answers
1
Accepted Answer

Hi, this warning is simply to clarify that running in a pipeline session will defer execution of jobs - generating pipeline step definitions instead of kicking off the jobs straight away.

For example calls such as Estimator.fit() or Processor.run() when using a pipeline session won't start a job (or wait for it to complete, or stream logs from CloudWatch), just prepare a definition to build up a pipeline that can be started later.

If you're already familiar with how PipelineSession works, I would say you can ignore it :-) If not, can refer to the SDK docs here for more details.

Could be that there's an inconsistency between LocalPipelineSession versus PipelineSession in showing the message? Or that you disagree this message should be at warning level... Either way I'd suggest raising an issue on the SageMaker Python SDK GitHub might be a good way to log that feedback with the team!

AWS
EXPERT
Alex_T
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions