updateReward
inline suspend fun SagemakerJobRuntimeClient.updateReward(crossinline block: UpdateRewardRequest.Builder.() -> Unit): UpdateRewardResponse
Updates the reward values for a trajectory and transitions it to reward-received status, signaling that it is eligible for processing. Call this operation after CompleteRollout to provide the computed reward scores.
Samples
// Updates the reward values for a completed trajectory.
val resp = sagemakerJobRuntimeClient.updateReward {
jobArn = "arn:aws:sagemaker:us-east-1:123456789012:job/AgentRFT/my-training-job"
trajectoryId = "trajectory-001"
rewards = listOf<Double>(
0.85.toDouble(),
0.92.toDouble(),
0.78.toDouble()
)
}Content copied to clipboard