Enforcing SACC file/object as an input to build_likelihood
method
#421
arthurmloureiro
started this conversation in
Ideas
Replies: 3 comments 1 reply
-
Tagging @marcpaterno @vitenti and @tilmantroester here for the discussion 😄 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Related: #394 |
Beta Was this translation helpful? Give feedback.
1 reply
-
I really think we should enforce that sacc files cannot be hardcoded into the likelihood. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
So from building the blinding infrastructure in a way that is "likelihood agnostic", I noticed one potential issue which I cannot protect the user from and that is having a hardcoded path to a sacc file in the likelihood.
For example, in the new firecrown tutorial documents we have an example where the SACC file is somewhat harcoded to the
build_likelihood()
function:Meanwhile, TXPipe deals with this in a different way:
For the blinding infrastructure, since we want the user to be able to blind a sacc file from the command line (as well as to import the library and use it in TXPipe) there is a potential issue if the user provides a likelihood for the blinding that works in the way that the first example above works because we use the likelihood method
get_data_vector()
to obtain the DV to be blinded. If we have adef build_likelihood(_)
with a hardcoded sacc file, the blinding will pass the user sacc file to this likelihood module which is ignored, using the hardcoded sacc instead.I don't seem to have a way to impose that any likelihoods passed to the blinding infrastructure should take a sacc file as input to the
build_likelihood
function.In my likelihood example for the blinding, I even have to implement some hacking to protect from giving the SACC file in different ways:
Personally, I think that we should discourage the user from creating likelihoods with hardcoded data-vectors. Is that something others agree? that maybe we should impose that the
build_likelihood
method must receive an input which contains either a sacc object or a path to a sacc file?Cheers!
Beta Was this translation helpful? Give feedback.
All reactions