-
Notifications
You must be signed in to change notification settings - Fork 2
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
Document dynamic provider dispatch in reportengine #63
Comments
cc @RosalynLP |
So this would mean we could for e.g. use the theory covmats generated before and not have to run the whole pipeline again? |
No, this is a totally different thing. This is to avoid having to rewrite many functions that only differ in the names thy take. E.g. if you have |
As for reusing the covmats, there is nothing preventing you from writing the output to a file and loading it in a production rule. There are many (and more complicated) examples of how to do that in the paramfits module. The problem is that I would have a hard time trusting anything given the amount of bookkeeping it involves. i remember I had the bright idea to remove a "redundant" check for as, and then the first runcard I wrote was loading the wrong file. Having everything computed in one go avoids a whole class of bugs. Of course there is a solution, namely NNPDF/nnpdf#224 (basically load and store entire namespaces), but that is not going to implement itself... In the meantime it would be interesting to look at this thing: |
So how about if you want to do the same kind of thing multiple times with different inputs? For example, the heat plots. Could you provide a list of actions under |
The idea is that you can use the
explicit_node
decorator in the config parser to return functions, which then have the role of providers.One can do something like:
Then one could do:
This has the crucial advantage that one does not have to redo the whole pipeline (i.e. there is only one
generic_table
). Runtime dispatch (as in one big substitute ofgeneric_table
that takes the inputs of both action1 and action2) will not work well if the various actions have completely different inputs.One disadvantage is that it obfuscates the help.
This should all b written in the guide somehow.
The text was updated successfully, but these errors were encountered: