sagemaker.train.rft.models#
Contract models for the rollout server API.
These models define the enforced contract between the platform trainer and customer rollout servers.
- Customer server requirements:
POST /rollout - Accept RolloutRequest GET /health - Return {“status”: “healthy”} when ready
Classes
|
Inference parameters for rollout sampling. |
|
Metadata sent by the trainer with each rollout request. |
|
Request format sent by the trainer to your /rollout endpoint. |
- class sagemaker.train.rft.models.InferenceParams(*, temperature: float | None = None, max_tokens: int | None = None, top_p: float | None = None)[source]#
Bases:
BaseModelInference parameters for rollout sampling.
All fields are optional - if not provided, model defaults are used.
- max_tokens: int | None#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- temperature: float | None#
- top_p: float | None#
- class sagemaker.train.rft.models.RolloutMetadata(*, job_arn: str, trajectory_id: str, endpoint: str, region: str = 'us-west-2')[source]#
Bases:
BaseModelMetadata sent by the trainer with each rollout request.
Pass this entire object (or its dict form) to RolloutFeedbackClient and make_inference_headers.
- endpoint: str#
- job_arn: str#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- region: str#
- trajectory_id: str#
- class sagemaker.train.rft.models.RolloutRequest(*, instance: Dict[str, Any], metadata: RolloutMetadata, inference_params: InferenceParams | None = None, model_name: str | None = None, model_endpoint: str | None = None)[source]#
Bases:
BaseModelRequest format sent by the trainer to your /rollout endpoint.
This is the enforced contract. Your server must accept this exact format.
- inference_params: InferenceParams | None#
- instance: Dict[str, Any]#
- metadata: RolloutMetadata#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_endpoint: str | None#
- model_name: str | None#