Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetric

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

The metric used for evaluation runs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1EvaluationRunMetric

Returns a new instance of GoogleCloudAiplatformV1EvaluationRunMetric.



11208
11209
11210
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11208

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#computation_based_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricComputationBasedMetricSpec

Specification for a computation based metric. Corresponds to the JSON property computationBasedMetricSpec



11176
11177
11178
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11176

def computation_based_metric_spec
  @computation_based_metric_spec
end

#llm_based_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricLlmBasedMetricSpec

Specification for an LLM based metric. Corresponds to the JSON property llmBasedMetricSpec



11181
11182
11183
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11181

def llm_based_metric_spec
  @llm_based_metric_spec
end

#metricString

Required. The name of the metric. Corresponds to the JSON property metric

Returns:

  • (String)


11186
11187
11188
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11186

def metric
  @metric
end

#metric_configGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Metric

The metric used for running evaluations. Corresponds to the JSON property metricConfig



11191
11192
11193
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11191

def metric_config
  @metric_config
end

#metric_resource_nameString

Optional. The resource name of the metric definition. Corresponds to the JSON property metricResourceName

Returns:

  • (String)


11196
11197
11198
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11196

def metric_resource_name
  @metric_resource_name
end

#predefined_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec

Specification for a pre-defined metric. Corresponds to the JSON property predefinedMetricSpec



11201
11202
11203
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11201

def predefined_metric_spec
  @predefined_metric_spec
end

#rubric_based_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpec

Specification for a metric that is based on rubrics. Corresponds to the JSON property rubricBasedMetricSpec



11206
11207
11208
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11206

def rubric_based_metric_spec
  @rubric_based_metric_spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11213
11214
11215
11216
11217
11218
11219
11220
11221
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11213

def update!(**args)
  @computation_based_metric_spec = args[:computation_based_metric_spec] if args.key?(:computation_based_metric_spec)
  @llm_based_metric_spec = args[:llm_based_metric_spec] if args.key?(:llm_based_metric_spec)
  @metric = args[:metric] if args.key?(:metric)
  @metric_config = args[:metric_config] if args.key?(:metric_config)
  @metric_resource_name = args[:metric_resource_name] if args.key?(:metric_resource_name)
  @predefined_metric_spec = args[:predefined_metric_spec] if args.key?(:predefined_metric_spec)
  @rubric_based_metric_spec = args[:rubric_based_metric_spec] if args.key?(:rubric_based_metric_spec)
end