VTDA-Group / superphot-plus

Superphot+, upgraded version of Superphot that uses nested sampling
MIT License
10 stars 0 forks source link

Changes to Lightcurve saving + SVI modularity #145

Closed kdesoto-astro closed 1 year ago

kdesoto-astro commented 1 year ago

Change Description

Moves some of SVI to helper function for easy ELASTICC filter use. Also edits Lightcurve file saving and loading to preserve name and sn_class fields. Also some tiny miscellaneous plotting function changes for the paper I'm working on.

Code Quality

github-actions[bot] commented 1 year ago
Before After Ratio Method
[a9aa7d22] [b4165863]
7.47±0.2s failed n/a inference_suite.InferenceSuite.time_dynesty_inference
16.7±2s failed n/a inference_suite.InferenceSuite.time_numpyro_nuts_inference
11.3±0.07s failed n/a inference_suite.InferenceSuite.time_numpyro_svi_inference
7.93±0.02s failed n/a sampling_suite.SamplingSuite.time_dynesty_single_file
16.0±2s failed n/a sampling_suite.SamplingSuite.time_nuts_single_file
11.8±0.05s failed n/a sampling_suite.SamplingSuite.time_svi_single_file

Click here to view all benchmarks.

github-actions[bot] commented 1 year ago
Before After Ratio Method
[a9aa7d22] [e73b7489]
4.49±0.2s failed n/a inference_suite.InferenceSuite.time_dynesty_inference
12.9±2s failed n/a inference_suite.InferenceSuite.time_numpyro_nuts_inference
8.39±0.02s failed n/a inference_suite.InferenceSuite.time_numpyro_svi_inference
4.31±0.03s failed n/a sampling_suite.SamplingSuite.time_dynesty_single_file
15.9±0.05s failed n/a sampling_suite.SamplingSuite.time_nuts_single_file
8.34±0.01s failed n/a sampling_suite.SamplingSuite.time_svi_single_file

Click here to view all benchmarks.

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

github-actions[bot] commented 1 year ago
Before After Ratio Method
[a9aa7d22] [fe945fe8]
4.51±0.1s failed n/a inference_suite.InferenceSuite.time_dynesty_inference
9.47±0.02s failed n/a inference_suite.InferenceSuite.time_numpyro_nuts_inference
8.17±0.02s failed n/a inference_suite.InferenceSuite.time_numpyro_svi_inference
4.22±0.02s failed n/a sampling_suite.SamplingSuite.time_dynesty_single_file
9.49±0.03s failed n/a sampling_suite.SamplingSuite.time_nuts_single_file
8.11±0.02s failed n/a sampling_suite.SamplingSuite.time_svi_single_file

Click here to view all benchmarks.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 57.75% and project coverage change: -1.09% :warning:

Comparison is base (a9aa7d2) 75.57% compared to head (83a6114) 74.49%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #145 +/- ## ========================================== - Coverage 75.57% 74.49% -1.09% ========================================== Files 33 34 +1 Lines 2698 2748 +50 ========================================== + Hits 2039 2047 +8 - Misses 659 701 +42 ``` | [Files Changed](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks) | Coverage Δ | | |---|---|---| | [src/superphot\_plus/elasticc\_class.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL2VsYXN0aWNjX2NsYXNzLnB5) | `0.00% <0.00%> (ø)` | | | [src/superphot\_plus/import\_utils.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL2ltcG9ydF91dGlscy5weQ==) | `100.00% <ø> (ø)` | | | [src/superphot\_plus/plotting/classifier\_results.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL3Bsb3R0aW5nL2NsYXNzaWZpZXJfcmVzdWx0cy5weQ==) | `53.62% <ø> (ø)` | | | [src/superphot\_plus/plotting/sampling\_results.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL3Bsb3R0aW5nL3NhbXBsaW5nX3Jlc3VsdHMucHk=) | `72.84% <0.00%> (-0.64%)` | :arrow_down: | | [src/superphot\_plus/surveys/fitting\_priors.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL3N1cnZleXMvZml0dGluZ19wcmlvcnMucHk=) | `85.33% <8.33%> (-14.67%)` | :arrow_down: | | [src/superphot\_plus/data\_generation/antares.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL2RhdGFfZ2VuZXJhdGlvbi9hbnRhcmVzLnB5) | `13.84% <33.33%> (-0.22%)` | :arrow_down: | | [src/superphot\_plus/surveys/surveys.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL3N1cnZleXMvc3VydmV5cy5weQ==) | `98.11% <75.00%> (-1.89%)` | :arrow_down: | | [src/superphot\_plus/samplers/numpyro\_sampler.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL3NhbXBsZXJzL251bXB5cm9fc2FtcGxlci5weQ==) | `91.89% <93.54%> (+1.23%)` | :arrow_up: | | [src/superphot\_plus/lightcurve.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL2xpZ2h0Y3VydmUucHk=) | `100.00% <100.00%> (ø)` | | | [src/superphot\_plus/plotting/confusion\_matrices.py](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks#diff-c3JjL3N1cGVycGhvdF9wbHVzL3Bsb3R0aW5nL2NvbmZ1c2lvbl9tYXRyaWNlcy5weQ==) | `92.06% <100.00%> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/lincc-frameworks/superphot-plus/pull/145/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lincc-frameworks)

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

github-actions[bot] commented 1 year ago
Before After Ratio Method
[a9aa7d22] [7f6d8361]
4.47±0.1s failed n/a inference_suite.InferenceSuite.time_dynesty_inference
15.3±0.06s failed n/a inference_suite.InferenceSuite.time_numpyro_nuts_inference
8.19±0s failed n/a inference_suite.InferenceSuite.time_numpyro_svi_inference
4.26±0.03s failed n/a sampling_suite.SamplingSuite.time_dynesty_single_file
12.5±2s failed n/a sampling_suite.SamplingSuite.time_nuts_single_file
8.25±0.01s failed n/a sampling_suite.SamplingSuite.time_svi_single_file

Click here to view all benchmarks.

github-actions[bot] commented 1 year ago
Before After Ratio Method
[a9aa7d22] [0e9aa578]
4.69±0.07s failed n/a inference_suite.InferenceSuite.time_dynesty_inference
9.43±0.06s failed n/a inference_suite.InferenceSuite.time_numpyro_nuts_inference
8.05±0.01s failed n/a inference_suite.InferenceSuite.time_numpyro_svi_inference
4.30±0.01s failed n/a sampling_suite.SamplingSuite.time_dynesty_single_file
12.2±1s failed n/a sampling_suite.SamplingSuite.time_nuts_single_file
8.01±0s failed n/a sampling_suite.SamplingSuite.time_svi_single_file

Click here to view all benchmarks.

github-actions[bot] commented 1 year ago
Before After Ratio Method
[a9aa7d22] [852cd3f2]
4.06±0.06s failed n/a inference_suite.InferenceSuite.time_dynesty_inference
14.5±0s failed n/a inference_suite.InferenceSuite.time_numpyro_nuts_inference
7.76±0.03s failed n/a inference_suite.InferenceSuite.time_numpyro_svi_inference
3.78±0.01s failed n/a sampling_suite.SamplingSuite.time_dynesty_single_file
11.7±1s failed n/a sampling_suite.SamplingSuite.time_nuts_single_file
7.78±0.02s failed n/a sampling_suite.SamplingSuite.time_svi_single_file

Click here to view all benchmarks.

github-actions[bot] commented 1 year ago
Before After Ratio Method
[837fb68e] [6c867b93]
5.41±0.02s failed n/a inference_suite.InferenceSuite.time_dynesty_inference
18.2±0.07s failed n/a inference_suite.InferenceSuite.time_numpyro_nuts_inference
9.72±0.02s failed n/a inference_suite.InferenceSuite.time_numpyro_svi_inference
4.93±0.04s failed n/a sampling_suite.SamplingSuite.time_dynesty_single_file
14.7±2s failed n/a sampling_suite.SamplingSuite.time_nuts_single_file
9.60±0.1s failed n/a sampling_suite.SamplingSuite.time_svi_single_file

Click here to view all benchmarks.