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

Expose FitResult #5255

Merged
merged 3 commits into from
May 15, 2024
Merged

Expose FitResult #5255

merged 3 commits into from
May 15, 2024

Conversation

Astro-Kirsty
Copy link
Member

Description
This PR is to resolve #5154

@Astro-Kirsty Astro-Kirsty added this to the 1.3 milestone May 7, 2024
@bkhelifi
Copy link
Member

bkhelifi commented May 7, 2024

Because this PR expose this class, I am wondering whether one should not describe the content of the FitResult class in the main docstring..

Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

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

Thanks @Astro-Kirsty .

Yes the docstring should give the correct info. This probably means that OptimizeResult and CovarianceResult need to be exposed too...

Regarding writing the FitResult to disc, we should check that we can fit everything in a yaml file. I suppose this is the easiest solution for this. This might be a second PR.

gammapy/modeling/fit.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 75.23%. Comparing base (67efb7e) to head (f3eb789).
Report is 11 commits behind head on main.

Files Patch % Lines
gammapy/modeling/fit.py 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5255      +/-   ##
==========================================
- Coverage   75.27%   75.23%   -0.05%     
==========================================
  Files         234      234              
  Lines       35148    35181      +33     
==========================================
+ Hits        26458    26467       +9     
- Misses       8690     8714      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Astro-Kirsty Astro-Kirsty changed the title Expose FitResult and add an option to write it to file Expose FitResult May 14, 2024
Signed-off-by: Astro-Kirsty <AstroKirsty@gmail.com>
Signed-off-by: Astro-Kirsty <AstroKirsty@gmail.com>
Copy link
Contributor

@QRemy QRemy left a comment

Choose a reason for hiding this comment

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

Thanks @Astro-Kirsty, I have only a minor comment about the change in the Registry class :

gammapy/modeling/fit.py Outdated Show resolved Hide resolved
Signed-off-by: Astro-Kirsty <AstroKirsty@gmail.com>
Copy link
Contributor

@QRemy QRemy left a comment

Choose a reason for hiding this comment

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

Thanks @Astro-Kirsty, no further comment.

Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

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

Thanks @Astro-Kirsty . Looks good!

@registerrier registerrier merged commit 5b811c2 into gammapy:main May 15, 2024
15 of 17 checks passed
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.

Exposing FitResult ?
4 participants