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

Refactor flowproposal into a submodule #419

Merged
merged 20 commits into from
Sep 2, 2024
Merged

Refactor flowproposal into a submodule #419

merged 20 commits into from
Sep 2, 2024

Conversation

mj-will
Copy link
Owner

@mj-will mj-will commented Aug 20, 2024

Whilst working on a version of FlowProposal that uses MCMC I realised it would be a lot easier if it could inherit from a base class that had also the training/reparameterisations but didn't include e.g. the options related to the latent contour. This PR refactors nessai.proposal.flowproposal into a submodule to hopefully make things simpler going forward.

I've tried to keep the commits as simple as possible, so looking at fd9ff51 might be the easiest way to see that things haven't changed significantly (the same tests with minimal changes still pass)

Other changes

  • Remove the deprecated rejection_sampling method
  • Add configure_poolsize and change configure_population
  • Include the constant volume mode configuration in FlowProposal.set_rescaling
  • Rename N to n_samples
  • Add an inverse method FlowModel

To-Do

  • Refactor tests to distinguish between the two classes

@mj-will mj-will added the refactor Code changes that neither fixes a bug nor adds a feature label Aug 20, 2024
@mj-will mj-will added this to the Future milestone Aug 20, 2024
@mj-will mj-will force-pushed the refactor-flowproposal branch from ef45202 to efc327e Compare August 20, 2024 14:03
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 97.81250% with 7 lines in your changes missing coverage. Please review.

Project coverage is 93.69%. Comparing base (3efb413) to head (4b67569).
Report is 111 commits behind head on main.

Files with missing lines Patch % Lines
nessai/proposal/flowproposal/flowproposal.py 97.08% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #419      +/-   ##
==========================================
+ Coverage   93.60%   93.69%   +0.09%     
==========================================
  Files          69       71       +2     
  Lines        6755     6807      +52     
==========================================
+ Hits         6323     6378      +55     
+ Misses        432      429       -3     
Flag Coverage Δ
unittests 93.69% <97.81%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@mj-will mj-will force-pushed the refactor-flowproposal branch from efc327e to fd9ff51 Compare August 20, 2024 14:10
@mj-will mj-will modified the milestones: Future, v0.14.0 Aug 20, 2024
@mj-will mj-will force-pushed the refactor-flowproposal branch from cedccdb to 4695692 Compare August 28, 2024 10:30
@mj-will mj-will marked this pull request as ready for review September 2, 2024 10:00
@mj-will mj-will merged commit 86e803a into main Sep 2, 2024
30 checks passed
@mj-will mj-will deleted the refactor-flowproposal branch September 2, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code changes that neither fixes a bug nor adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant