sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

AttributeError: 'LocalSagemakerClient' object has no attribute 'create_pipeline'

Open neilmcguigan opened this issue 3 years ago • 6 comments

Describe the bug SageMaker Python SDK model building pipelines does not work in Local Mode

To reproduce


sagemaker_session = LocalSession()
sagemaker_session.config = {'local': {'local_code': True}}

processor = SKLearnProcessor(
    base_job_name = "processingjob",
    role = cfg.role_arn,
    framework_version = cfg.sklearn_version,
    instance_count = cfg.instance_count,
    instance_type = "local",
    sagemaker_session=sagemaker_session
)

processing_step = ProcessingStep(
    name="processing",
    processor=processor,
    code = "code/preprocessor.py"
)

pipeline = Pipeline(
    name = "mypipeline",
    steps = [processing_step],
    sagemaker_session = sagemaker_session
)

pipeline.upsert(role_arn = cfg.role_arn)
pipeline.start()

Expected behavior SageMaker model building pipelines should work in Local Mode for faster development

Screenshots or logs AttributeError: 'LocalSagemakerClient' object has no attribute 'create_pipeline'

System information A description of your system. Please provide:

  • SageMaker Python SDK version: 2.78.0
  • Python version: 3.8
  • CPU or GPU: CPU
  • Custom Docker image (Y/N): N

neilmcguigan avatar Mar 11 '22 22:03 neilmcguigan

Hi @neilmcguigan, you're correct that local mode jobs won't work today in a pipeline. For that to happen, pipelines needs its own version of local mode that recreates the server-side orchestration logic. This is on the team's radar.

staubhp avatar Mar 17 '22 17:03 staubhp

Hello, the cold-start time of SageMaker pipelines is a real pain when developing and doing small experiments, and can account for most of the pipeline execution time. This feature would be great to tackle this issue! Is there any ETA?

ycrouin avatar Apr 14 '22 15:04 ycrouin

This would be very useful.

knoam avatar Apr 27 '22 20:04 knoam

we are diligently working on this. =)

jerrypeng7773 avatar May 13 '22 17:05 jerrypeng7773

Good to know, for now I'll keep testing locally each step at a time.

cirofdo avatar Jun 08 '22 20:06 cirofdo

It seems to be avaiable now https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-local-mode.html

cirofdo avatar Sep 05 '22 22:09 cirofdo

Closing this tkt since the requested feature is now available in SageMaker Python SDK.

ShwetaSingh801 avatar Dec 22 '23 04:12 ShwetaSingh801