31 instantiations of StringMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (25)
ResultsTests.cs (25)
232
var metricA = new
StringMetric
("Measurement System: None", "None");
233
var metricB = new
StringMetric
("Measurement System: Unknown", "Unknown");
234
var metricC = new
StringMetric
("Measurement System: Metric", "Metric");
235
var metricD = new
StringMetric
("Measurement System: Imperial", "Imperial");
236
var metricE = new
StringMetric
("Measurement System: USCustomary", "UsCustomary");
237
var metricF = new
StringMetric
("Measurement System: Nautical", "Nautical");
238
var metricG = new
StringMetric
("Measurement System: Astronomical", "Astronomical");
239
var metricH = new
StringMetric
("Measurement System: Multiple", "Multiple");
240
var metricI = new
StringMetric
("Measurement System: Blah", "Blah", reason: "Value was unexpected");
241
var metricJ = new
StringMetric
("Measurement System: Empty", "", reason: "Value was empty");
242
var metricK = new
StringMetric
("Measurement System: Null", reason: "Value was null");
288
var metricA = new
StringMetric
("Measurement System: None", "None");
289
var metricB = new
StringMetric
("Measurement System: Unknown", "Unknown");
290
var metricC = new
StringMetric
("Measurement System: Metric", "Metric");
291
var metricD = new
StringMetric
("Measurement System: Imperial", "Imperial");
292
var metricE = new
StringMetric
("Measurement System: USCustomary", "USCustomary");
293
var metricF = new
StringMetric
("Measurement System: Nautical", "Nautical");
294
var metricG = new
StringMetric
("Measurement System: Astronomical", "Astronomical");
295
var metricH = new
StringMetric
("Measurement System: Multiple", "Multiple");
296
var metricI = new
StringMetric
("Measurement System: Blah", "Blah", reason: "Value was unexpected");
297
var metricJ = new
StringMetric
("Measurement System: Empty", "", reason: "Value was empty");
298
var metricK = new
StringMetric
("Measurement System: Null", reason: "Value was null");
442
var metric4 = new
StringMetric
("Metric with warning diagnostics only");
495
var metric4 = new
StringMetric
("Metric with warning diagnostics only");
554
var metric4 = new
StringMetric
("Metric with warning diagnostics only", value: "A");
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
ResultStoreTester.cs (1)
27
StringMetric stringMetric = new
StringMetric
("string", value: "Good");
ScenarioRunResultTests.cs (2)
55
var stringMetric = new
StringMetric
("string", value: "A", reason: string.Empty);
147
var stringMetric = new
StringMetric
("string", value: "A", reason: string.Empty);
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyService.cs (2)
108
metric = new
StringMetric
(metricName, stringValue, reason);
114
metric = new
StringMetric
(metricName, labelElement.ToString(), reason);
Microsoft.Extensions.AI.Evaluation.Tests (1)
BuiltInEvaluatorUtilitiesTests.cs (1)
45
var metric = new
StringMetric
("name");
40 references to StringMetric
Microsoft.Extensions.AI.Evaluation (5)
EvaluationMetric.cs (1)
24
[JsonDerivedType(typeof(
StringMetric
), "string")]
StringMetric.cs (4)
10
/// A common use case for <see cref="
StringMetric
"/> is to represent a single value in an enumeration (or to represent
13
/// <param name="name">The name of the <see cref="
StringMetric
"/>.</param>
14
/// <param name="value">The value of the <see cref="
StringMetric
"/>.</param>
17
/// <see cref="
StringMetric
"/>.
Microsoft.Extensions.AI.Evaluation.Integration.Tests (27)
ResultsTests.cs (27)
111
(m is
StringMetric
e && e.Value is not null)
130
if (m is not
StringMetric
e)
232
var
metricA = new StringMetric("Measurement System: None", "None");
233
var
metricB = new StringMetric("Measurement System: Unknown", "Unknown");
234
var
metricC = new StringMetric("Measurement System: Metric", "Metric");
235
var
metricD = new StringMetric("Measurement System: Imperial", "Imperial");
236
var
metricE = new StringMetric("Measurement System: USCustomary", "UsCustomary");
237
var
metricF = new StringMetric("Measurement System: Nautical", "Nautical");
238
var
metricG = new StringMetric("Measurement System: Astronomical", "Astronomical");
239
var
metricH = new StringMetric("Measurement System: Multiple", "Multiple");
240
var
metricI = new StringMetric("Measurement System: Blah", "Blah", reason: "Value was unexpected");
241
var
metricJ = new StringMetric("Measurement System: Empty", "", reason: "Value was empty");
242
var
metricK = new StringMetric("Measurement System: Null", reason: "Value was null");
288
var
metricA = new StringMetric("Measurement System: None", "None");
289
var
metricB = new StringMetric("Measurement System: Unknown", "Unknown");
290
var
metricC = new StringMetric("Measurement System: Metric", "Metric");
291
var
metricD = new StringMetric("Measurement System: Imperial", "Imperial");
292
var
metricE = new StringMetric("Measurement System: USCustomary", "USCustomary");
293
var
metricF = new StringMetric("Measurement System: Nautical", "Nautical");
294
var
metricG = new StringMetric("Measurement System: Astronomical", "Astronomical");
295
var
metricH = new StringMetric("Measurement System: Multiple", "Multiple");
296
var
metricI = new StringMetric("Measurement System: Blah", "Blah", reason: "Value was unexpected");
297
var
metricJ = new StringMetric("Measurement System: Empty", "", reason: "Value was empty");
298
var
metricK = new StringMetric("Measurement System: Null", reason: "Value was null");
442
var
metric4 = new StringMetric("Metric with warning diagnostics only");
495
var
metric4 = new StringMetric("Metric with warning diagnostics only");
554
var
metric4 = new StringMetric("Metric with warning diagnostics only", value: "A");
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
ResultStoreTester.cs (1)
27
StringMetric
stringMetric = new StringMetric("string", value: "Good");
ScenarioRunResultTests.cs (6)
55
var
stringMetric = new StringMetric("string", value: "A", reason: string.Empty);
147
var
stringMetric = new StringMetric("string", value: "A", reason: string.Empty);
245
StringMetric
stringMetric = first.Get<
StringMetric
>("string");
246
StringMetric
deserializedStringMetric = second.Get<
StringMetric
>("string");
Microsoft.Extensions.AI.Evaluation.Tests (1)
BuiltInEvaluatorUtilitiesTests.cs (1)
45
var
metric = new StringMetric("name");