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

Update random array from test_stepsizes.TestStepSizeBB.test_bb_converge #2052

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

hrobarts
Copy link
Contributor

@hrobarts hrobarts commented Jan 24, 2025

Changes

test_stepsizes.TestStepSizeBB.test_bb_converge failed in windows because of random array, this PR updates to a fixed array

Testing you performed

Please add any demo scripts to https://github.com/TomographicImaging/CIL-Demos/tree/main/misc

Related issues/links

Closes #2064

Checklist

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have updated the relevant documentation
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'Waiting for review'

Contribution Notes

Please read and adhere to the developer guide and local patterns and conventions.

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

@hrobarts hrobarts changed the title Remove random array from test_stepsizes.TestStepSizeBB.test_bb_converge Update random array from test_stepsizes.TestStepSizeBB.test_bb_converge Jan 27, 2025
@hrobarts hrobarts requested a review from paskino January 27, 2025 13:48
@paskino
Copy link
Contributor

paskino commented Jan 28, 2025

I think that the test_bb_converge is a tricky test.

For one, it is a functional test and you are testing that 2 algorithms converge to the same solution with some accuracy without reaching convergence (i.e. infinite iterations).

I would say that a better check would be to:

  1. get the reference solution, for instance by pre-running GD with 1/f.L or maybe 2/f.L with a lot of iterations and hard code the solution. I think you could just impose the solution by setting A and x and calculating b.
  2. Compare the solution to the reference solution. The test could be that within 80 iterations you want to be below a certain threshold

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.

test_stepsizes.TestStepSizeBB.test_bb_converge fails in windows
3 participants