Skip to content

Commit

Permalink
Merge pull request #262 from marlenezw/eval_image
Browse files Browse the repository at this point in the history
adding eval tables to gh action.
  • Loading branch information
marlenezw authored Nov 13, 2024
2 parents 9302f02 + 5e5ef90 commit f20795d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/evaluate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,20 @@ jobs:
with:
name: eval_result
path: ./src/api/evaluate/eval_results.jsonl

- name: Upload image eval results as build artifact
uses: actions/upload-artifact@v4
with:
name: eval_image_result
path: ./src/api/evaluate/image_eval_results.jsonl

- name: GitHub Summary Step
if: ${{ success() }}
working-directory: ./src/api
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "📊 Promptflow Evaluation Results" >> $GITHUB_STEP_SUMMARY
echo "📊 Evaluation Results" >> $GITHUB_STEP_SUMMARY
cat evaluate/eval_results.md >> $GITHUB_STEP_SUMMARY
cat evaluate/image_eval_results.md >> $GITHUB_STEP_SUMMARY
17 changes: 1 addition & 16 deletions src/api/evaluate/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,6 @@ def __init__(self, project_scope):
credential=DefaultAzureCredential(),
azure_ai_project=project_scope,
),
# "violence":ViolenceMultimodalEvaluator(
# credential=DefaultAzureCredential(),
# azure_ai_project=project_scope,
# ),
# "self_harm":SelfHarmMultimodalEvaluator(
# credential=DefaultAzureCredential(),
# azure_ai_project=project_scope,
# ),
# "hate_unfairness":HateUnfairnessMultimodalEvaluator(
# credential=DefaultAzureCredential(),
# azure_ai_project=project_scope,
# ),
# "sexual":SexualMultimodalEvaluator(
# credential=DefaultAzureCredential(),
# azure_ai_project=project_scope,
# ),
"protected_material": ProtectedMaterialMultimodalEvaluator(
credential=DefaultAzureCredential(),
azure_ai_project=project_scope,
Expand Down Expand Up @@ -188,6 +172,7 @@ def __call__(self, *, messages, **kwargs):
print("\n===== Calling Evaluate API - Content Safety & Protected Material Evaluator for multi-modal =======")
output = {}
if runningonGH:
print('Running in actions')
for message in messages:
conversation = {"conversation": { "messages" : message}}

Expand Down

0 comments on commit f20795d

Please sign in to comment.