---
title: "metrics(subject:input:)"
framework: evaluations
role: symbol
role_heading: Instance Method
path: "evaluations/evaluatorprotocol/metrics(subject:input:)"
---

# metrics(subject:input:)

Computes metrics for the given subject, given the input sample.

## Declaration

```swift
nonisolated(nonsending) func metrics(subject: Self.Subject, input: Self.Input) async throws -> [Metric]
```

## Parameters

- `subject`: The subject of evaluation, which the evaluation’s subject(from:) method produces.
- `input`: The input sample that contains the expected value and other context.

## Return Value

Return Value An array of metrics produced by this evaluator.
