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

[FEA]: Add python bindings for construction of a RouterStage<ControlMessage> #1519

Closed
2 tasks done
Tracked by #1847
drobison00 opened this issue Feb 14, 2024 · 0 comments · Fixed by #1963
Closed
2 tasks done
Tracked by #1847

[FEA]: Add python bindings for construction of a RouterStage<ControlMessage> #1519

drobison00 opened this issue Feb 14, 2024 · 0 comments · Fixed by #1963
Assignees
Labels
feature request New feature or request improvement Improvement to existing functionality non-breaking Non-breaking change

Comments

@drobison00
Copy link
Contributor

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

High

Please provide a clear description of problem this feature solves

Building multi-function pipelines will benefit tremendously from having these primitives.

Currently Morpheus emulates routing behavior using a broadcast-and-filter pattern, which works, but its clunky and non-intuitive as we expand the number of people who will be building out application pipelines.

We currently have a Router operator defined in (cpp/mrc/include/mrc/node/operators/router.hpp) : this needs to have python bindings written for a single specialization ControlMessage -> ControlMessage.

Describe your ideal solution

We would like to support something like the following:

def routing_criteria(msg: ControlMessage):
  if (criteria_0(msg)):
      # route to output 0
      
  if (criteria_1(msg)):
      # route to output 1
      
  ... snip ...  
pipe = Pipeline(...)

stage_a = pipe.add_node(...)
stage_b = pipe.add_node(...)
stage_c = pipe.add_node(...)
router = pipe.add_node(RouterStage(route_fn = routing_criteria))

pipe.add_edge(stage_a, router)
pipe.add_edge(router, stage_b)  # Route here for criteria 0
pipe.add_edge(router, stage_c)  # Route here for criteria 1

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request
@drobison00 drobison00 added the feature request New feature or request label Feb 14, 2024
@drobison00 drobison00 added non-breaking Non-breaking change improvement Improvement to existing functionality labels Feb 14, 2024
@mdemoret-nv mdemoret-nv self-assigned this Aug 16, 2024
@mdemoret-nv mdemoret-nv added this to the 24.10 - Release milestone Aug 16, 2024
@morpheus-bot-test morpheus-bot-test bot moved this from Todo to Review - Ready for Review in Morpheus Boards Oct 21, 2024
rapids-bot bot pushed a commit that referenced this issue Oct 31, 2024
Requires changes from MRC PR: nv-morpheus/MRC#502

Closes #1519

Authors:
  - Michael Demoret (https://github.com/mdemoret-nv)

Approvers:
  - David Gardner (https://github.com/dagardner-nv)

URL: #1963
@github-project-automation github-project-automation bot moved this from Review - Ready for Review to Done in Morpheus Boards Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request improvement Improvement to existing functionality non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants