Skip to content

Pipeline creation throws error for parameters in processor network_config  #2345

Closed

Description

@staubhp

Describe the bug
Parameterizing a property of NetworkConfig, putting that NetworkConfig into a processor and then using that processor in a ProcessingStep will throw a validation exception when the pipeline is upserted.

To reproduce

sagemaker_networkconfig = NetworkConfig(
        security_group_ids=security_group_id_param,
        subnets=subnet_id_param,
    )

sklearn_processor = SKLearnProcessor(
        framework_version=framework_version,
        instance_type=processing_instance_type_param,
        instance_count=processing_instance_count_param,
        base_job_name=f"{prefix}/sklearn-preprocess",
        sagemaker_session=sagemaker_session,
        role=execution_role_param,
        network_config=sagemaker_networkconfig
    )

An error occurred (ValidationException) when calling the CreatePipeline operation: Unable to parse pipeline definition. Expecting start of Json Array.

Expected behavior
Parameters should be correctly translated in any property of a processor, estimator, et al

Additional context
This might apply more broadly to any "nested" property, need to confirm.

Activity

  1. added
    component: pipelines
    on May 13, 2021
  2. staubhp commented on Jun 21, 2021

    @staubhp
    ContributorAuthor

    This is working as intended. The bug was from passing the param outside of a list.

    Passing it like this works:

    sagemaker_networkconfig = NetworkConfig(
            security_group_ids=security_group_id_param,
            subnets=[subnet_id1_param, subnet_id2_param],
        )
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: pipelines

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions