Skip to content

TransformStep fails in local mode when using ModelPackage #4002

Closed Answered by alex-vinnik-sp
alex-vinnik-sp asked this question in Help
Discussion options

You must be logged in to vote

Looks like the following code gives you an agnostic pipeline suitable for both local and cloud

    model = Model(
        image_uri="image uri",
        model_data="uri to model.tar.gz",
        role=role,
        sagemaker_session=sagemaker_session,
    )

    step_create_model = ModelStep(name="Your name", step_args=model.create())

    transformer = Transformer(
        model_name=step_create_model.properties.ModelName,
        instance_type=instance_type,
        instance_count=1,
        sagemaker_session=sagemaker_session,
        env=env,
        output_path=output_path,
        strategy="MultiRecord",
        assemble_with="Line",
        accept="text/csv",
    )

    transform_ar…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alex-vinnik-sp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant