prob-ml / bliss

Bayesian Light Source Separator
MIT License
41 stars 11 forks source link

Add MultiDetectEncoder #1035

Closed YicunDuanUMich closed 3 months ago

YicunDuanUMich commented 3 months ago
YicunDuanUMich commented 3 months ago

I add a function sample_for_metrics to Encoder because it's useful for notebook. I refactor the DC2DataModule and change some methods to instance method. This is because I found that we can run multiprocessing by passing the self as an argument. (In old DC2, this is impossible since one attribute in self has thread lock). I'm sorry for frequently changing the interface of DC2. I'll post a message in slack and help those who use DC2 to modify their code.

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 91.35%. Comparing base (bbc2b95) to head (8e610b2).

Files Patch % Lines
bliss/surveys/dc2.py 95.65% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1035 +/- ## ========================================== + Coverage 91.22% 91.35% +0.13% ========================================== Files 25 25 Lines 3179 3171 -8 ========================================== - Hits 2900 2897 -3 + Misses 279 274 -5 ``` | [Flag](https://app.codecov.io/gh/prob-ml/bliss/pull/1035/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=prob-ml) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/prob-ml/bliss/pull/1035/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=prob-ml) | `91.35% <95.65%> (+0.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=prob-ml#carryforward-flags-in-the-pull-request-comment) to find out more.

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

YicunDuanUMich commented 3 months ago

I've addressed the comments, and it's ready for merge.