Skip to content

Commit

Permalink
black format
Browse files Browse the repository at this point in the history
  • Loading branch information
ericljx2020-gmail committed Sep 19, 2024
1 parent 51ca946 commit 48a5c76
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bootcamp/tutorials/integration/evaluation_with_phoenix.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,16 @@
"df[\"context\"] = df[\"contexts\"]\n",
"df[\"reference\"] = df[\"contexts\"]\n",
"df.rename(columns={\"question\": \"input\", \"answer\": \"output\"}, inplace=True)\n",
"assert all(column in df.columns for column in [\"output\", \"input\", \"context\", \"reference\"])\n",
"assert all(\n",
" column in df.columns for column in [\"output\", \"input\", \"context\", \"reference\"]\n",
")\n",
"\n",
"# Run the evaluators, each evaluator will return a dataframe with evaluation results\n",
"# We upload the evaluation results to Phoenix in the next step\n",
"hallucination_eval_df, qa_eval_df = run_evals(\n",
" dataframe=df, evaluators=[hallucination_evaluator, qa_evaluator], provide_explanation=True\n",
" dataframe=df,\n",
" evaluators=[hallucination_evaluator, qa_evaluator],\n",
" provide_explanation=True,\n",
")"
]
},
Expand Down

0 comments on commit 48a5c76

Please sign in to comment.