-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace dag flows with flex flows in oob evaluators #3500
replace dag flows with flex flows in oob evaluators #3500
Conversation
...flow-evals/promptflow/evals/evaluators/_content_safety/_content_safety_sub_evaluator_base.py
Outdated
Show resolved
Hide resolved
...flow-evals/promptflow/evals/evaluators/_content_safety/_content_safety_sub_evaluator_base.py
Outdated
Show resolved
Hide resolved
src/promptflow-rag/pyproject.toml
Outdated
@@ -32,7 +32,7 @@ packages = [ | |||
|
|||
# dependencies | |||
[tool.poetry.dependencies] | |||
python = "<4.0,>=3.8" | |||
python = "<4.0,>=3.8.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can undo this, since it's not related to the task. But I was noticing version problems when attempting to setup the repo with poetry. This fixed them.
b511a55
to
264db51
Compare
# --------------------------------------------------------- | ||
|
||
# Relative imports don't work for loaded evaluators, so we need absolute imports to be possible. | ||
from .f1_score import compute_f1_score |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the flow folder? The F1Score implementation is pretty simple, so we can merge all the necessary code into _f1_score.py for easier maintainability.
@@ -9,8 +9,12 @@ | |||
import requests | |||
from azure.core.credentials import TokenCredential | |||
from azure.identity import DefaultAzureCredential | |||
from constants import EvaluationMetrics, RAIService, Tasks | |||
from utils import get_harm_severity_level | |||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have deprecated dag flow, can we rename the "flow" folder to "common"?
replacing with a branch that isn't from a forked repo so things will work. |
Remove deprecated DAG flags from built-in evaluators in the evals pacakge, replacing them with flex flows. Functionality this amounts to directly coding the behavior specified in former flow.dag.yaml files.
This ended up editing 2 evaluators: F1 score and content safety. In the case of content safety, I used this change to refactor the code slightly into a base class and children, which mostly still exist just to have their own docstrings.