Skip to content

SampleConfig

Source code in docs_src/capo_sagemakertrainingsessionruntime/types/sample_config.py
class SampleConfig(TypedDict, closed=True):
    prompt: "capo_sagemakertrainingsessionruntime.types.model_input.ModelInput"
    """<p>The input prompt to send to the model for text generation.</p>"""
    num_samples: "int"
    """<p>The number of independent samples to generate for the prompt.</p>"""
    sampling_params: (
        "capo_sagemakertrainingsessionruntime.types.sampling_params.SamplingParams"
    )
    """<p>The parameters controlling the sampling strategy.</p>"""
    include_prompt_logprobs: "bool"
    """<p>Specifies whether to include per-token log-probabilities for the input prompt in the response.</p>"""
    topk_prompt_logprobs: "int"
    """<p>The number of top-k log-probabilities to return per prompt token.</p>"""
    model_package_arn: NotRequired["str"]
    """<p>The ARN of the model package whose checkpoint this sample should run against. Must be a valid SageMaker model package ARN in the format <code>arn:aws:sagemaker:REGION:ACCOUNT:model-package/PACKAGE_NAME/VERSION</code>. When absent, the sample runs against the session's latest checkpoint.</p>"""

include_prompt_logprobs instance-attribute

include_prompt_logprobs: bool

Specifies whether to include per-token log-probabilities for the input prompt in the response.

model_package_arn instance-attribute

model_package_arn: NotRequired[str]

The ARN of the model package whose checkpoint this sample should run against. Must be a valid SageMaker model package ARN in the format arn:aws:sagemaker:REGION:ACCOUNT:model-package/PACKAGE_NAME/VERSION. When absent, the sample runs against the session's latest checkpoint.

num_samples instance-attribute

num_samples: int

The number of independent samples to generate for the prompt.

prompt instance-attribute

prompt: ModelInput

The input prompt to send to the model for text generation.

sampling_params instance-attribute

sampling_params: SamplingParams

The parameters controlling the sampling strategy.

topk_prompt_logprobs instance-attribute

topk_prompt_logprobs: int

The number of top-k log-probabilities to return per prompt token.