Skip to content

Fix SPDHG progress bar to show correct number of steps#3012

Draft
ashleymeigh2 wants to merge 1 commit into
mainfrom
2911_SPDHG-progress-bar
Draft

Fix SPDHG progress bar to show correct number of steps#3012
ashleymeigh2 wants to merge 1 commit into
mainfrom
2911_SPDHG-progress-bar

Conversation

@ashleymeigh2
Copy link
Copy Markdown
Collaborator

Issue

Closes #2911

Description

Fix SPDHG progress bar to show the correct number of steps. The progress bar now matches the actual number of iterations for SPDHG (no extra setup step), while non-stochastic algorithms still include a setup step. This resolves the issue where the progress bar showed two extra steps for SPDHG.

Developer Testing

  • I have verified unit tests pass locally: python -m pytest -vs
  • Manual test: Ran SPDHG and confirmed progress bar matches expected iteration count.

Acceptance Criteria and Reviewer Testing

  • Unit tests pass locally: python -m pytest -vs
  • SPDHG progress bar matches expected number of iterations (no extra steps)
  • Other algorithms’ progress bars remain unchanged

Documentation and Additional Notes

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 69.221% (-0.02%) from 69.238%
when pulling f0f8dbd on 2911_SPDHG-progress-bar
into c78e79b on main.

@samtygier-stfc
Copy link
Copy Markdown
Collaborator

The trouble with "fixing" this to make the numbers match is that there are more steps than just the PDHG iterations. If we ignore the other steps, then the progress bar is less informative.

@ashleymeigh2
Copy link
Copy Markdown
Collaborator Author

ashleymeigh2 commented Feb 4, 2026

The trouble with "fixing" this to make the numbers match is that there are more steps than just the PDHG iterations. If we ignore the other steps, then the progress bar is less informative.

I agree — the bar reflects total reconstruction work, not just PDHG iterations. We could either keep counting all steps and report iteration progress in the message (e.g. PDHG iteration i / num_iter), or treat setup as a separate step and be explicit that the bar represents overall progress rather than iterations. What do you suggest?

@samtygier-stfc
Copy link
Copy Markdown
Collaborator

Would it be possible to tweak the message to make it clearer?

A full solution would be to have the progress system track steps and sub steps. But that would be a lot more work. Not a high priority this side of release.

@ashleymeigh2 ashleymeigh2 marked this pull request as draft February 12, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconstruction: 2 Extra iterations shown in progress status for SPDHG

3 participants