Enforcing SACC file/object as an input to build_likelihood method
#421
Replies: 4 comments 10 replies
-
|
Tagging @marcpaterno @vitenti and @tilmantroester here for the discussion 😄 |
Beta Was this translation helpful? Give feedback.
-
|
Related: #394 |
Beta Was this translation helpful? Give feedback.
-
|
I really think we should enforce that sacc files cannot be hardcoded into the likelihood. |
Beta Was this translation helpful? Give feedback.
-
|
The factory mechanism introduced into Firecrown v1.8 allows the (name of the) SACC file to be passed as a parameter. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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_likelihoodfunction.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_likelihoodmethod 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