Skip to content

Handle graph-definition syntax for edges#27

Open
rskew wants to merge 3 commits intogeekscape:masterfrom
silverpond:rs/edge-definitions
Open

Handle graph-definition syntax for edges#27
rskew wants to merge 3 commits intogeekscape:masterfrom
silverpond:rs/edge-definitions

Conversation

@rskew
Copy link
Contributor

@rskew rskew commented Jan 21, 2025

Enable optional specification of edges between pipeline-element outputs and pipeline-element inputs.

Removing this break in the existing test causes it to fail, the other changes in this PR make the test pass: https://github.com/geekscape/aiko_services/blob/master/src/aiko_services/tests/unit/test_pipeline_graph.py#L115

Example graph:

   __________
  /   \      \
 A     B ---- C --->
  \___/______/

has pipeline definition graph syntax:

  "graph": [
    "(A B (A.a_out_1: b_in_1 A.a_out_2: b_in_2) C (A.a_out_1: c_in_1 B.b_out_1: c_in_2 A.a_out_2: c_in_3))"
  ],

Note that output names (if specified) must be fully-qualified, e.g. "B.b_out_1" instead
of "b_out_1". This is due to the graph traversal not yet handling edges
defined between B and C in the example graph, only between A and B, and
between A and C.
If edges are not specified, input names are drawn from the swag as normal.

Use of map_out_nodes in _process_map_out and map_in_nodes in _process_map_in are commented out because of this issue with the traversal. Rather than completely change the structure of map_in_nodes and map_out_nodes, I've left them and added a new structure edge_definitions, with the aim of making this easier to review.

rskew and others added 2 commits November 13, 2025 15:52
Example graph:
   __________
  /   \      \
 A     B ---- C --->
  \___/______/
has syntax in a pipeline definition:
  "graph": [
    "(A B (A.a_out_1: b_in_1 A.a_out_2: b_in_2) C (A.a_out_1: c_in_1 B.b_out_1: c_in_2 A.a_out_2: c_in_3))"
  ],
Note that output names must be fully-qualified, e.g. "B.b_out_1" instead
of "b_out_1". This is due to the graph traversal not yet handling edges
defined between B and C in the example graph, only between A and B, and
between A and C.
@rskew rskew force-pushed the rs/edge-definitions branch from 43a282a to 0a7aae8 Compare November 13, 2025 04:53
…class name. Update element_name to match the 'name' field of an element in the pipeline definition rather than the class name
@rskew rskew force-pushed the rs/edge-definitions branch from 0a7aae8 to 8376c07 Compare November 13, 2025 04:56
@rskew rskew marked this pull request as ready for review November 13, 2025 04:58
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