Skip to content
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

Closed

Conversation

MilesHolland
Copy link
Member

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.

@@ -32,7 +32,7 @@ packages = [

# dependencies
[tool.poetry.dependencies]
python = "<4.0,>=3.8"
python = "<4.0,>=3.8.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we change here?

Copy link
Member Author

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.

@MilesHolland MilesHolland force-pushed the replace-dag-with-flex-in-evals branch from b511a55 to 264db51 Compare July 8, 2024 21:01
# ---------------------------------------------------------

# Relative imports don't work for loaded evaluators, so we need absolute imports to be possible.
from .f1_score import compute_f1_score
Copy link
Member

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:
Copy link
Member

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"?

@MilesHolland
Copy link
Member Author

replacing with a branch that isn't from a forked repo so things will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants