Metric(**data: typing.Any)The metric used for evaluation.
Methods
Metric
Metric(**data: typing.Any)Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
model_post_init
model_post_init(context: Any, /) -> NoneThis function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that's what pydantic-core passes when calling it.
to_yaml_file
to_yaml_file(file_path: str, version: typing.Optional[str] = None) -> NoneDumps the metric object to a YAML file.
| Exceptions | |
|---|---|
| Type | Description |
ImportError |
If the pyyaml library is not installed. |
validate_name
validate_name(
model: vertexai._genai.types.common.Metric,
) -> vertexai._genai.types.common.MetricAPI documentation for validate_name method.