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

profile picture
已提問 1 年前檢視次數 861 次
2 個答案
1
已接受的答案

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
專家
Alex_T
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南