aws / aws/sagemaker-spark

SagemakerModel.transform() doesn't use model's sagemakerClient

Open
#28 11 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Scala
Stars
301
Forks
129
PR merge metrics
No merged PRs in 30d

Description

If you create a new `SageMakerModel` instance (say, with `fromModelS3Path()`), you can pass in your own `sagemakerClient`. However, when you go to use the model after it's been created, `transform()` does not use that client to send prediction requests. It appears to hardcode a `AmazonSageMakerRuntimeClientBuilder.defaultClient` instead in `RequestBatchIterator`.

Pardon my ignorance, but is there a reason that it can't just pass the `sagemakerClient` through?

Contributor guide

Open the contributing guide

Research direction

Start at SageMakerModel.transform and inspect RequestBatchIterator, especially where the AmazonSageMakerRuntimeClientBuilder.defaultClient is selected. Reproduce the issue with a SageMakerModel created using a custom sagemakerClient, then verify that transform sends prediction requests through that client instead; done means the supplied client is no longer bypassed.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, machine-learning, scala, spark
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.