pyrit.score.get_all_harm_metrics#
- get_all_harm_metrics(harm_category: str) List[ScorerMetricsWithIdentity[HarmScorerMetrics]][source]#
Load all harm scorer metrics for a specific harm category.
Returns a list of ScorerMetricsWithIdentity[HarmScorerMetrics] objects that wrap the scorer’s identity information and its performance metrics, enabling clean attribute access like entry.metrics.mean_absolute_error or entry.metrics.harm_category.
- Parameters:
harm_category (str) – The harm category to load metrics for (e.g., “hate_speech”, “violence”).
- Returns:
- List of metrics with scorer identity.
Access metrics via entry.metrics.mean_absolute_error, entry.metrics.harm_category, etc. Access scorer info via entry.scorer_identifier.type, etc.
- Return type: