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 Segment Break to Morpheus API #350

Closed
mdemoret-nv opened this issue Sep 12, 2022 · 0 comments
Closed

[FEA] Add Segment Break to Morpheus API #350

mdemoret-nv opened this issue Sep 12, 2022 · 0 comments
Assignees
Labels
feature request New feature or request Needs Triage Need team to review and classify

Comments

@mdemoret-nv
Copy link
Contributor

Is your feature request related to a problem? Please describe.
While we added the ability to use multiple segments in SRF, there is currently no way to use this from the Morpheus API. This feature will add the ability to add segment breaks between stages in the LinearPipeline API to be ready for larger, multi-segment changes coming in the future.

Describe the solution you'd like
Until issue #229 is implemented, and SRF correctly handles multi input/output nodes, we should only focus on updating the LinearPipeline class. With LinearPipeline adding segments is relatively simple and will only require a single method, add_segment_break() and an additional map that tracks which stages belong to which segment. The pipeline construction for LinearPipeline will work as follows:

  1. Create a default "segment" that all stages will go into by default
    2. This is not a full segment since they cant be created until build() is called. Just track which segment stages belong in.
  2. When add_stage is called, that stage is added to the current active segment
    4. The current active segment is just a key in an ordered dictionary
  3. When add_segment_break() is called, a new key in the segment dictionary is created
    6. All new calls to add_stage will put these stages into the new key
  4. Finally, when build() is called in the pipeline, we will iterate over all segment keys in the ordered dict. For each key:
    8. Create a new segment
    9. If its not the first segment, add a port for the incoming data
    10. Add all stages for this segment
    11. If its not the last segment, add a port for the outgoing data

Describe alternatives you've considered
Other alternatives would require issue #229 to be completed and features from SRF 22.11.

Additional context
Add any other context, code examples, or references to existing implementations about the feature request here.

@mdemoret-nv mdemoret-nv added feature request New feature or request Needs Triage Need team to review and classify labels Sep 12, 2022
@mdemoret-nv mdemoret-nv added this to the Multi-Segment Support milestone Sep 12, 2022
@ghost ghost closed this as completed in 94235c6 Sep 28, 2022
This issue was closed.
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 Needs Triage Need team to review and classify
Projects
Archived in project
Development

No branches or pull requests

2 participants