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

Fix indicator box #1486

Merged
merged 13 commits into from
Aug 2, 2023
Merged

Conversation

paskino
Copy link
Contributor

@paskino paskino commented Jul 7, 2023

Describe your changes

Removes wrong implementation of the proximal_conjugate method in IndicatorBox. Uses the implementation in the base class.

Describe any testing you have performed

Please add any demo scripts to CIL-Demos/misc/
Added unittests to test implementation of proximal conjugate in all proximable functions.

Link relevant issues

closes #1485

Checklist when you are ready to request a review

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • 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

@epapoutsellis
Copy link
Contributor

If you want you can also fix the following:

  • accelerated vs backend (GradientOperator, KullbackLeibler)
  • raise error when lower>'upper`

I also suggest to create a new class for the lower==upper case, e.g., IndicatorSingleton. Also, it would be nice to create a separate script for each function, test_IndicatorBox, because it is difficult to have a massive script that tests all of our functions.

Note that the test fails on Windows but not on Linux
@paskino
Copy link
Contributor Author

paskino commented Jul 8, 2023

Notice that a new issue has arisen while developing the unit tests on Windows #1487

@paskino
Copy link
Contributor Author

paskino commented Jul 8, 2023

it would be nice to create a separate script for each function, test_IndicatorBox, because it is difficult to have a massive script that tests all of our functions.

Maybe, but currently our unit tests are a bit of a mess. In practice I added tests for proximal_conjugate of all functions.

@gfardell
Copy link
Member

TotalVariation(backend='c') you had a comment saying it failed locally. I can't recreate this, and jenkins seems to be happy?

Copy link
Member

@gfardell gfardell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved once we get to the bottom of TV C backend failing for Edo, #1487 !

@paskino
Copy link
Contributor Author

paskino commented Jul 20, 2023

I closed #1487 and slightly modified the unittests for the KullbackLeibler adding the 2 backends. Once CI is happy we can merge @gfardell

@paskino
Copy link
Contributor Author

paskino commented Jul 20, 2023

  • raise error when lower>'upper`

Maybe it's worth adding the test in the init.

@paskino paskino merged commit a2e45fe into TomographicImaging:master Aug 2, 2023
1 check passed
@paskino paskino deleted the fix_IndicatorBox branch August 2, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IndicatorBox: Proximal_conjugate is not correct
3 participants