Skip to content

Expose Map zone outputs to the client after wg.run()#777

Draft
GeigerJ2 wants to merge 4 commits into
aiidateam:mainfrom
GeigerJ2:fix/map-zone-output-retrieval
Draft

Expose Map zone outputs to the client after wg.run()#777
GeigerJ2 wants to merge 4 commits into
aiidateam:mainfrom
GeigerJ2:fix/map-zone-output-retrieval

Conversation

@GeigerJ2
Copy link
Copy Markdown
Contributor

Zone/Map tasks have no AiiDA process node (pk=None), so
Task.update_state could never populate their outputs on the client
side. After wg.run(), map_zone.outputs.<name> returned an empty dict
even though the engine had the correct gathered results internally.

Three changes:

  • gather() now creates dynamic output namespaces so the client can
    assign per-prefix keys after the run.

  • update_map_task_state persists the gathered result node PKs in
    task_map_info[name]['result_pks'] on the process node.

  • WorkGraph.update() reads those PKs back and populates the zone
    task's output sockets via _populate_zone_outputs.

Zone/Map tasks have no AiiDA process node (`pk=None`), so
`Task.update_state` could never populate their outputs on the client
side. After `wg.run()`, `map_zone.outputs.<name>` returned an empty dict
even though the engine had the correct gathered results internally.

Three changes:

- `gather()` now creates dynamic output namespaces so the client can
  assign per-prefix keys after the run.

- `update_map_task_state` persists the gathered result node PKs in
  `task_map_info[name]['result_pks']` on the process node.

- `WorkGraph.update()` reads those PKs back and populates the zone
  task's output sockets via `_populate_zone_outputs`.
@GeigerJ2 GeigerJ2 marked this pull request as draft April 14, 2026 08:53
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

Successfully merging this pull request may close these issues.

1 participant