Skip to content

collect resolves explicit_node lazily #1493

@siranipour

Description

@siranipour

This is probably more appropriate for reportengine, but the issue arises in validphys. Consider the following runcard:

dataspecs:
  - pdf: NNPDF31_nnlo_as_0118

theoryid: 200

use_cuts: "internal"

dataset_input: {dataset: NMC}

actions_:
  - plot_fancy_dataspecs

This errors complaining that covmat is not an array. Taking a look, it's an explicit_node instance. If we look at why, it's because plot_fancy_dataspecs takes as an argument dataspecs_results which is a collection of results over dataspecs:

dataspecs_results = collect("results", ("dataspecs",))

and since #1477 was merged, the covariance_matrix is dispatched as an explicit_node and this is the root of the bug. The explicit_node does not get resolved in time by reportengine and so the results objects in the collection don't have the covariance_matrix resolved by the time we hit this line:
results = [dataspecs_results[0][0], *[r[1] for r in dataspecs_results]]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions