feat(weave): Add progress bar to Evaluation.evalute.
Adds a pbar to the evaluate loop
- Also adds a verbose param to print as before.
Summary by CodeRabbit
- New Features
- Enhanced the evaluation experience with an interactive progress indicator that clearly displays evaluation progress and offers optional detailed output.
- Introduced a real-time iteration speed display that provides immediate, user-friendly insights into task performance.
Walkthrough
The changes update the Evaluation class in the evaluation module to enhance feedback during model evaluations. Both the get_eval_results and evaluate methods now accept a verbose parameter (defaulting to False). The updates replace basic print statements with visual feedback via the rich.progress module for progress tracking and utilize rich.console alongside rich.panel to format the evaluation summary, improving clarity and aesthetics without altering core functionalities.
Changes
| File | Summary |
|---|---|
weave/flow/eval.py |
Updated get_eval_results and evaluate methods to accept a verbose parameter. Integrated rich.progress for progress bars and switched from print statements to visually formatted console output using rich.console and rich.panel. |
weave/flow/util.py |
Added IterationSpeedColumn class extending ProgressColumn. Implemented render method to display iteration speed in a human-readable format. |
Sequence Diagram(s)
sequenceDiagram
participant U as User
participant E as Evaluation
participant P as RichProgress
U->>E: Call get_eval_results(model, verbose)
alt Verbose disabled
E->>P: Update progress silently
else Verbose enabled
E->>P: Display detailed progress updates
end
E->>U: Return evaluation results
sequenceDiagram
participant U as User
participant E as Evaluation
participant C as RichConsole
U->>E: Call evaluate(model, verbose)
E->>C: Render summary in a formatted panel
E->>U: Return detailed evaluation summary
Poem
I'm a bunny hopping through the code,
With progress bars lighting my humble road.
Evaluation tweaks make the journey fun,
Structured panels gleam like the morning sun.
I nibble on bugs and celebrate with glee,
In ASCII hops, a joyful melody! 🐰✨
[!TIP]
⚡🧪 Multi-step agentic review comment chat (experimental)
- We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments. - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=c8a1974a8af74569f9caaf6afb05f2d1dd5b15ca
If I randomly print text on the model it doesn't disturb the progress:
Is this still necessary @andrewtruong ?
we do get weird behavior here
I still prefer this weird behavior than what we have now.