-
Notifications
You must be signed in to change notification settings - Fork 354
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
look for injections not only on the top-level in hdf file #4876
base: master
Are you sure you want to change the base?
Conversation
This has more to do with how we want to handle the heirarchical analysis. @cdcapano Should weigh in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this; it's a good thing to fix. However, the patch as-is will only fix the case for the JointPrimaryMarginalized model, and will only load the injection from the primary model at that. It would be good to fix this for more generic hierarchical models. Currently, plotting injection parameters is broken for all hierarchical runs, since the injections are specific to each sub-model.
I think the way to go about this is to check if there's a submodels
argument in the [model]
section of the config file, and if so, get their names. Then cycle over all of the submodels and load the injection from each one, but remap the parameter names of the injections to <submodel_label>__<param>
. You'd want to do that anyway since the template parameters will have the submodel name pre-pended to them. I think that should work for all models that inherit from the HierarchicalModel, including the JointPrimaryMarginalized, but you and @ahnitz should verify since you wrote the JointPrimary.
Thanks for the comments, my
So |
Ok, then add a static method to the |
Standard information about the request
This is a: bug fix
This change affects: inference, workflow
This change changes: plotting
This change will: fix the plotting injected values from mutliband demargin hdf file's injections
Motivation
the default operation is to look for
injections
on the top-level in hdf file, this fix lets it to look it under the primary modelContents
lets it to look
injections
under the primary modelLinks to any issues or associated PRs
Testing performed
Additional notes