Skip to content

Implement function to calculate metrics from EvaluationResult #6063

Closed

Description

@silvanocerza

As specified in proposal #5794 we need to implement the calculate_metrics() function.

The calculated_metrics() function will expect this arguments:

  • evaluation_result: EvaluationResult
  • metric: Union[Metric, MetricCalculator]
  • **kwargs

And will return an instance of MetricsResult.

Metric can be either a simple Enum or a Literal. Probably an Enum will ease the discoverability of supported metrics.
MetricCalculator will be a Callable[..., MetricResult].
**kwargs will be passed to the function used to calculate the metrics, can be obviously omitted.

For more detailed information check out the original proposal.

Activity

  1. added this to the 2.0-beta milestone on Oct 16, 2023
  2. removed this from the 2.0-beta milestone on Oct 18, 2023
  3. added
    P2
    on Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions