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

Using key: {from_: <production rule>} overwrites value for key in collect #38

Open
wilsonmr opened this issue Nov 20, 2020 · 1 comment
Assignees

Comments

@wilsonmr
Copy link
Contributor

This is linked to NNPDF/nnpdf#1008 but I have found another example:

fit: 031120-mw-001
pdf: {from_: fitpdf} # take key from production rule

pdfs:
 - NNPDF31_nnlo_as_0118

actions_:
 - report(main=True)

template_text: |
 {@with pdfs@}
 {@pdf@}
 {@endwith@}

outputs 031120-mw-001. However:

fit: 031120-mw-001
pdf: {from_: fit} # take key from a resource with `as_input` method

pdfs:
 - NNPDF31_nnlo_as_0118

actions_:
 - report(main=True)

template_text: |
 {@with pdfs@}
 {@pdf@}
 {@endwith@}

does not, it outputs NNPDF31_nnlo_as_0118. I personally think the second behaviour is correct but maybe I have a bad opinion!

If we want to change this then I guess there is something special with how {from_: <production rule>} is interacting with collect? I guess it doesn't get resolved and somehow takes precedence when unresolved whereas if {from_: } gets resolved sooner?

@wilsonmr wilsonmr changed the title Using key: {from_: <production rule>} overwrites value for key unexpectedly Using key: {from_: <production rule>} overwrites value for key in collect Nov 20, 2020
@wilsonmr wilsonmr self-assigned this Nov 20, 2020
@Zaharid
Copy link
Contributor

Zaharid commented Nov 20, 2020

I have no idea why or how the first thing is happening, but it is surely wrong...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants