Skip to content

Namespace production rules give wrong results for implicit keys #16

@Zaharid

Description

@Zaharid

The following validphys runcard

theory:
    from_: fit

theoryid:
    from_: theory

use_cuts: "fromfit"


pdf:
    from_: fit


experiments:
    from_: fit

dataspecs:
  - fit: NNPDF31_nlo_as_0118_1000

  - fit: NNPDF31_nnlo_as_0118_1000

actions_:
    - matched_datasets_from_dataspecs::dataspecs plot_fancy_dataspecs

gives the wrong results in that the datasets incorrectly resolve to the first (NLO) value. It works fine if

experiments:
    from_: fit

is inside each dataspec. This has to do with the fact that even though we specify write=False in the validphys production rules, the parameter is not propagated to resolve_signature_params. This change:

diff --git a/src/reportengine/configparser.py b/src/reportengine/configparser.py
index 26138aa..3d79657 100644
--- a/src/reportengine/configparser.py
+++ b/src/reportengine/configparser.py
@@ -294,7 +294,7 @@ class Config(metaclass=ConfigMetaClass):
                                                ns,
                                                input_params= input_params,
                                                max_index=max_index,
-                                               parents=parents)
+                                               parents=parents, write=False)
             except KeyError:
                 if param.default is not sig.empty:
                     pval = param.default

appears to fix the problem, but then some other test fails. Have to check if correctly propagating the argument works. Or rewrite the whole thing in a way that is not crazy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions