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.



9819
9820
9821
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9819

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

Instance Attribute Details

#llm_based_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricLlmBasedMetricSpec

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



9797
9798
9799
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9797

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)


9802
9803
9804
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9802

def metric
  @metric
end

#metric_configGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Metric

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



9807
9808
9809
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9807

def metric_config
  @metric_config
end

#predefined_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec

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



9812
9813
9814
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9812

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



9817
9818
9819
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9817

def rubric_based_metric_spec
  @rubric_based_metric_spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9824
9825
9826
9827
9828
9829
9830
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9824

def update!(**args)
  @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)
  @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