Method: tuningJobs.validateReinforcementTuningReward

Full name: projects.locations.tuningJobs.validateReinforcementTuningReward

Validates a reward on a given example.

Endpoint

post https://{service-endpoint}/v1beta1/{parent}/tuningJobs:validateReinforcementTuningReward

Where {service-endpoint} is one of the supported service endpoints.

Path parameters

parent string

Required. The resource name of the Location to validate the reward in Format: projects/{project}/locations/{location}

Request body

The request body contains data with the following structure:

Fields
sampleResponse object (Content)

Required. The sample response for validating the reward configuration.

example object (ReinforcementTuningExample)

Required. The example to validate the reward configuration.

reward_config Union type
The reward configuration to validate. This can be a single or a composite reward configuration. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
singleRewardConfig object (SingleReinforcementTuningRewardConfig)

Optional. Single Reward function configuration for reinforcement tuning.

compositeRewardConfig object (CompositeReinforcementTuningRewardConfig)

Optional. Composite reward function configuration for reinforcement tuning.

End of mutually exclusive fields.

Response body

Response message for GenAiTuningService.ValidateReinforcementTuningReward.

If successful, the response body contains data with the following structure:

Fields
rewardDetails
(deprecated)
map (key: string, value: number)

Output only. Deprecated: Use rewardInfoDetails instead. A map from reward name to the calculated reward for the reward function. This field will only be populated when a CompositeReinforcementTuningRewardConfig is provided in the request. It will not be set for a SingleReinforcementTuningRewardConfig.

errorStatus object (Status)

Output only. In case of an error, this field will be populated with a detailed error message for overall rewards to help with debugging.

rewardInfoDetails map (key: string, value: object (ReinforcementTuningRewardInfo))

A map from reward name to reward info.

overallReward number

Output only. The overall weighted reward. For a CompositeReinforcementTuningRewardConfig, this is the weighted average of all rewards. For a SingleReinforcementTuningRewardConfig, this will be the value of the single reward.

error
(deprecated)
string

Output only. Deprecated: Use errorStatus instead. In case of an error, this field will be populated with a detailed error message to help with debugging.

JSON representation
{
  "rewardDetails": {
    string: number,
    ...
  },
  "errorStatus": {
    object (Status)
  },
  "rewardInfoDetails": {
    string: {
      object (ReinforcementTuningRewardInfo)
    },
    ...
  },
  "overallReward": number,
  "error": string
}

ReinforcementTuningRewardInfo

The reward info for a reward function.

Fields
userRequestedAuxInfo string

Output only. The user-requested auxiliary info for the reward function. This field is set only if the Cloud Run reward function configured by user returns a "user_requested_aux_info". Refer to ReinforcementTuningCloudRunRewardScorer for more details.

errorStatus object (Status)

Output only. In case of an error for this reward, this field will be populated with a detailed error status.

reward number

Output only. The calculated reward for the reward function.

JSON representation
{
  "userRequestedAuxInfo": string,
  "errorStatus": {
    object (Status)
  },
  "reward": number
}