Skip to content

SagemakerJobRuntimeServiceClient#

Index > SagemakerJobRuntimeService > SagemakerJobRuntimeServiceClient

Auto-generated documentation for SagemakerJobRuntimeService type annotations stubs module mypy-boto3-sagemakerjobruntime.

SagemakerJobRuntimeServiceClient#

Type annotations and code completion for boto3.client("sagemakerjobruntime"). boto3 documentation

# SagemakerJobRuntimeServiceClient usage example

from boto3.session import Session
from mypy_boto3_sagemakerjobruntime.client import SagemakerJobRuntimeServiceClient

def get_sagemakerjobruntime_client() -> SagemakerJobRuntimeServiceClient:
    return Session().client("sagemakerjobruntime")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("sagemakerjobruntime").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("sagemakerjobruntime")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServiceError,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_sagemakerjobruntime.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

can_paginate#

Type annotations and code completion for boto3.client("sagemakerjobruntime").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

generate_presigned_url#

Type annotations and code completion for boto3.client("sagemakerjobruntime").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

complete_rollout#

Marks a rollout as complete, indicating that no further turns will be appended to the trajectory.

Type annotations and code completion for boto3.client("sagemakerjobruntime").complete_rollout method. boto3 documentation

# complete_rollout method definition

def complete_rollout(
    self,
    *,
    JobArn: str,
    TrajectoryId: str,
    Status: CompletionStatusType = ...,  # (1)
    ClientToken: str = ...,
) -> dict[str, Any]:
    ...
  1. See CompletionStatusType
# complete_rollout method usage example with argument unpacking

kwargs: CompleteRolloutRequestTypeDef = {  # (1)
    "JobArn": ...,
    "TrajectoryId": ...,
}

parent.complete_rollout(**kwargs)
  1. See CompleteRolloutRequestTypeDef

sample#

Sends an inference request to the model during a job execution.

Type annotations and code completion for boto3.client("sagemakerjobruntime").sample method. boto3 documentation

# sample method definition

def sample(
    self,
    *,
    JobArn: str,
    TrajectoryId: str,
    Body: BlobTypeDef,
) -> SampleResponseTypeDef:  # (1)
    ...
  1. See SampleResponseTypeDef
# sample method usage example with argument unpacking

kwargs: SampleRequestTypeDef = {  # (1)
    "JobArn": ...,
    "TrajectoryId": ...,
    "Body": ...,
}

parent.sample(**kwargs)
  1. See SampleRequestTypeDef

sample_with_response_stream#

Sends a streaming inference request to the model during a job execution.

Type annotations and code completion for boto3.client("sagemakerjobruntime").sample_with_response_stream method. boto3 documentation

# sample_with_response_stream method definition

def sample_with_response_stream(
    self,
    *,
    JobArn: str,
    TrajectoryId: str,
    Body: BlobTypeDef,
) -> SampleWithResponseStreamResponseTypeDef:  # (1)
    ...
  1. See SampleWithResponseStreamResponseTypeDef
# sample_with_response_stream method usage example with argument unpacking

kwargs: SampleWithResponseStreamRequestTypeDef = {  # (1)
    "JobArn": ...,
    "TrajectoryId": ...,
    "Body": ...,
}

parent.sample_with_response_stream(**kwargs)
  1. See SampleWithResponseStreamRequestTypeDef

update_reward#

Updates the reward values for a trajectory and transitions it to reward-received status, signaling that it is eligible for processing.

Type annotations and code completion for boto3.client("sagemakerjobruntime").update_reward method. boto3 documentation

# update_reward method definition

def update_reward(
    self,
    *,
    JobArn: str,
    TrajectoryId: str,
    Rewards: Sequence[float],
    ClientToken: str = ...,
) -> dict[str, Any]:
    ...
# update_reward method usage example with argument unpacking

kwargs: UpdateRewardRequestTypeDef = {  # (1)
    "JobArn": ...,
    "TrajectoryId": ...,
    "Rewards": ...,
}

parent.update_reward(**kwargs)
  1. See UpdateRewardRequestTypeDef