Skip to content

Progress bar resets to 1/total_items on completion in run.py:146 (completed=True) #38

Description

@himanshu231204

Description

In openagent_eval/cli/commands/run.py at line 146, completed=True is passed to Progress.update(). In Rich's progress bar, True is coerced to 1 in a numeric context, causing the progress bar to drop from 100% to 1/total_items when the evaluation completes.

Location

openagent_eval/cli/commands/run.py, line 146

Current Code

progress.update(task, description="Complete!", completed=True)

Why This Is Wrong

  • completed=True evaluates to 1 when used numerically
  • The task's total is set to total_items (e.g., 50 items) at line 126
  • Before this line, the bar correctly shows 50/50 (100%)
  • After this line, the bar drops to 1/50 (2%) — it looks like the progress reset

Expected Fix

# Option A: Advance to completion properly
progress.update(task, description="Complete!", completed=total_items)

# Option B: Use advance + update
progress.update(task, description="Complete!")

Impact

  • Visual bug: The progress bar visibly drops from 100% to near-zero right at the end
  • This is especially noticeable for large evaluations with many items
  • Creates a poor user experience — looks like something went wrong

Severity

High — Visible UI bug that affects all evaluation runs.

Steps to Reproduce

  1. Create a config file with a dataset of 10+ items
  2. Run oaeval run config.yaml
  3. Observe the progress bar drops to a near-zero percentage when the evaluation completes and the description changes to "Complete!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions