Skip to content

Commit

Permalink
Fixing spell checks
Browse files Browse the repository at this point in the history
  • Loading branch information
singankit committed Apr 2, 2024
1 parent 001b91d commit 74a1fe4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@
"pywin",
"STARTF",
"mltable",
"setenv"
"setenv",
"raisvc",
"evals"
],
"flagWords": [
"Prompt Flow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@


def get_harm_severity_level(harm_score: int) -> str:
HAMR_SEVERITY_LEVEL_MAPPING = {constants.HarmSeverityLevel.Safe: [0, 1],
HARM_SEVERITY_LEVEL_MAPPING = {constants.HarmSeverityLevel.Safe: [0, 1],
constants.HarmSeverityLevel.Low: [2, 3],
constants.HarmSeverityLevel.Medium: [4, 5],
constants.HarmSeverityLevel.High: [6, 7]
}
if harm_score == np.nan or harm_score is None:
return np.nan
for harm_level, harm_score_range in HAMR_SEVERITY_LEVEL_MAPPING.items():
for harm_level, harm_score_range in HARM_SEVERITY_LEVEL_MAPPING.items():
if harm_score >= harm_score_range[0] and harm_score <= harm_score_range[1]:
return harm_level.name
return np.nan
4 changes: 2 additions & 2 deletions src/promptflow-evals/samples/built_in_evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

project_scope = {
"subscription_id": "2d385bf4-0756-4a76-aa95-28bf9ed3b625",
"resource_group_name": "rg-ninhuai",
"project_name": "ninhu-0410",
"resource_group_name": "rg-name",
"project_name": "project-name",
}


Expand Down

0 comments on commit 74a1fe4

Please sign in to comment.