Ptychography-4-0 / ptychography

Code repository for Ptychography 4.0 project.
https://ptychography-4-0.github.io/ptychography/
GNU General Public License v3.0
27 stars 14 forks source link

WIP Integration of Live WDD #72

Open bangunarya opened 1 year ago

bangunarya commented 1 year ago

Contributor Checklist:

Current implementation

Integration of Live WDD algorithm to Ptychography40 repository. The original code is given here : https://github.com/Ptychography-4-0/LiveWDD List of the contribution.

  1. Notebook example with given dataset
  2. File for WDD

To Do List

codecov[bot] commented 1 year ago

Codecov Report

Attention: Patch coverage is 98.75776% with 4 lines in your changes missing coverage. Please review.

Project coverage is 85.08%. Comparing base (bdea089) to head (b7ecbbf).

Files with missing lines Patch % Lines
src/ptychography40/reconstruction/wdd/wdd_udf.py 97.82% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #72 +/- ## ========================================== + Coverage 77.18% 85.08% +7.89% ========================================== Files 8 12 +4 Lines 548 865 +317 Branches 84 130 +46 ========================================== + Hits 423 736 +313 - Misses 110 112 +2 - Partials 15 17 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sk1p commented 1 year ago

@bangunarya let me know if you need help with getting the tests green - I have an idea how to fix the issues.

bangunarya commented 1 year ago

@bangunarya let me know if you need help with getting the tests green - I have an idea how to fix the issues.

Hi @sk1p, sure I will contact you on telegram

sk1p commented 1 year ago

/azp run Ptychography-4-0.ptychography

azure-pipelines[bot] commented 1 year ago
Azure Pipelines successfully started running 1 pipeline(s).
sk1p commented 1 year ago

CI failure seems to come from ancient numba version used with Python 3.6 - it's probably time to drop that anyways. cc @uellue

bangunarya commented 1 year ago

This is coming along nicely! It should even be possible to reach ~100% coverage for all added files. Mostly, the lines currently not covered are handling the different complex dtypes, and it would indeed be nice to ensure that in the future, it's still possible to pass in complex64.

The tests are now using complex128 because of precision issues, so there should be additional tests using the reduced precision (and one exercising the "invalid value" branch, making sure the correct error is raised). Because of the precision issue, allclose should have custom tolerances passed for these new tests.

There's also a branch for default transformation - that should also have a test case, making sure the code doesn't crash in case of not specifying the transformation.

Thank you for the patience with all these CI issues!

Thank you for the update of the infrastructure. Yes, I am thinking of adding more test, including some transformations.

sk1p commented 3 months ago

CI failures need #79 - also important for numerical correctness w/ current numpy!

sk1p commented 3 months ago

@uellue I think you forgot the add the wdd.rst file - that's failing the docs build at the moment.

sk1p commented 3 months ago

Regarding tests, the numba_coverage job is very slow, it might make sense to use smaller examples? Especially when the jit is disabled... Before, they ran in ~1m30s, now it's still running after ~11m. We should target under 3min for numba_coverage.