From 424dd18e664f2383303e93ab8ba1bafd390f1f37 Mon Sep 17 00:00:00 2001 From: Diondra <16376603+diondrapeck@users.noreply.github.com> Date: Wed, 11 Sep 2024 17:12:04 -0400 Subject: [PATCH] Rename IndirectAttack evaluation enum to "xpia" (#3729) # Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. # All Promptflow Contribution checklist: - [ ] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [ ] **I have read the [contribution guidelines](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md).** - [ ] **I confirm that all new dependencies are compatible with the MIT license.** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [ ] Title of the pull request is clear and informative. - [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes. --- src/promptflow-evals/promptflow/evals/_constants.py | 2 +- src/promptflow-evals/promptflow/evals/evaluate/_evaluate.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/promptflow-evals/promptflow/evals/_constants.py b/src/promptflow-evals/promptflow/evals/_constants.py index 38d19028c0f..893f2f06bbd 100644 --- a/src/promptflow-evals/promptflow/evals/_constants.py +++ b/src/promptflow-evals/promptflow/evals/_constants.py @@ -19,7 +19,7 @@ class EvaluationMetrics: SELF_HARM = "self_harm" SEXUAL = "sexual" PROTECTED_MATERIAL = "protected_material" - INDIRECT_ATTACK = "indirect_attack" + XPIA = "xpia" class _InternalEvaluationMetrics: diff --git a/src/promptflow-evals/promptflow/evals/evaluate/_evaluate.py b/src/promptflow-evals/promptflow/evals/evaluate/_evaluate.py index 4f015c912b4..578236c527f 100644 --- a/src/promptflow-evals/promptflow/evals/evaluate/_evaluate.py +++ b/src/promptflow-evals/promptflow/evals/evaluate/_evaluate.py @@ -92,7 +92,7 @@ def _aggregate_label_defect_metrics(df: pd.DataFrame) -> Tuple[List[str], Dict[s handled_metrics = [ EvaluationMetrics.PROTECTED_MATERIAL, _InternalEvaluationMetrics.ECI, - EvaluationMetrics.INDIRECT_ATTACK, + EvaluationMetrics.XPIA, ] label_cols = [] for col in df.columns: