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

Add progress bar + runner fixes #10348

Merged
merged 13 commits into from
Sep 8, 2023
Merged

Add progress bar + runner fixes #10348

merged 13 commits into from
Sep 8, 2023

Conversation

hinthornw
Copy link
Collaborator

@hinthornw hinthornw commented Sep 8, 2023

  • Add progress bar to eval runs
  • Use thread pool for concurrency
  • Update some error messages
  • Friendlier project name
  • Print out quantiles of the final stats

Closes LS-902

@vercel
Copy link

vercel bot commented Sep 8, 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 Sep 8, 2023 2:39pm

@dosubot dosubot bot added the 🤖:improvement Medium size change to existing code to handle new use-cases label Sep 8, 2023
@hinthornw hinthornw marked this pull request as ready for review September 8, 2023 01:47
Copy link
Collaborator

@nfcampos nfcampos left a comment

Choose a reason for hiding this comment

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

Overall looks good, some comments

libs/langchain/langchain/callbacks/tracers/evaluation.py Outdated Show resolved Hide resolved
libs/langchain/langchain/callbacks/tracers/evaluation.py Outdated Show resolved Hide resolved
from threading import Lock


class ProgressBar:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Btw we have tqdm as a transitive dependency already courtesy of openai sdk

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh that's even nicer. I almost never run into scenarios where people don't have tqdm so i'll just use that, just didn't want to add another requirement

Copy link
Collaborator Author

@hinthornw hinthornw Sep 8, 2023

Choose a reason for hiding this comment

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

Hm actually just gonna keep the print method since it works and pbar kept not erasing (i can swap out later if we want)

libs/langchain/langchain/smith/evaluation/progress.py Outdated Show resolved Hide resolved
libs/langchain/langchain/smith/evaluation/runner_utils.py Outdated Show resolved Hide resolved
if verbose:
try:
agg_feedback = results.get_aggregate_feedback()
print("\n Eval quantiles:")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why use print for some things and logger for others?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm mainlyformatting? default logging configs have a prefix that makes it less pretty to view. The error messaging with logging seems right for actually reporting errors (especially since i then don't have to handle threading)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can switch at some point if we want

@hinthornw hinthornw merged commit 46e9abd into master Sep 8, 2023
31 checks passed
@hinthornw hinthornw deleted the wfh/progress_bar branch September 8, 2023 14:45
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.

None yet

2 participants