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

Return feedback #9629

Merged
merged 3 commits into from
Aug 28, 2023
Merged

Return feedback #9629

merged 3 commits into from
Aug 28, 2023

Conversation

hinthornw
Copy link
Collaborator

@hinthornw hinthornw commented Aug 22, 2023

Return the feedback values in an eval run result

Also made a helper method to display as a dataframe but it may be overkill

@vercel
Copy link

vercel bot commented Aug 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Aug 25, 2023 10:54pm

@dosubot dosubot bot added the 🤖:improvement Medium size change to existing code to handle new use-cases label Aug 22, 2023
@@ -62,13 +63,13 @@ class EvaluatorCallbackHandler(BaseTracer):
The LangSmith project name to be organize eval chain runs under.
"""

name: str = "evaluator_callback_handler"
Copy link
Collaborator

Choose a reason for hiding this comment

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

ooc why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

heh wasn't intentional

except Exception as e:
logger.error(
f"Error evaluating run {run.id} with "
f"{evaluator.__class__.__name__}: {e}",
exc_info=True,
)
raise e
example_id = str(run.reference_example_id)
self.logged_feedback.setdefault(example_id, []).append(feedback)
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe noob q but why can't feedback just be returned

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the callbacks are all called via the run manager in the depths of the callstack so it would just be ignored sadly

@hinthornw hinthornw force-pushed the wfh/return_feedback branch from 2b88733 to f6dc4fb Compare August 25, 2023 22:54
@hinthornw hinthornw merged commit cb642ef into master Aug 28, 2023
@hinthornw hinthornw deleted the wfh/return_feedback branch August 28, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants