weave icon indicating copy to clipboard operation
weave copied to clipboard

feat(weave): Add progress bar to Evaluation.evalute.

Open tcapelle opened this issue 10 months ago • 7 comments

Adds a pbar to the evaluate loop pbar

  • Also adds a verbose param to print as before.
Screenshot 2025-02-24 at 19 42 18

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.

tcapelle avatar Feb 24 '25 18:02 tcapelle

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 @coderabbitai in 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 @coderabbitai in 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere 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.

coderabbitai[bot] avatar Feb 24 '25 18:02 coderabbitai[bot]

If I randomly print text on the model it doesn't disturb the progress: Screenshot 2025-02-27 at 15 43 22

tcapelle avatar Feb 27 '25 14:02 tcapelle

Screenshot 2025-02-27 at 15 47 27

tcapelle avatar Feb 27 '25 14:02 tcapelle

Is this still necessary @andrewtruong ?

tcapelle avatar Mar 10 '25 23:03 tcapelle

Screenshot 2025-03-17 at 16 52 39 we do get weird behavior here

tcapelle avatar Mar 17 '25 23:03 tcapelle

I still prefer this weird behavior than what we have now.

tcapelle avatar Apr 02 '25 16:04 tcapelle