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

[RFC] A multiplexfeature for Workflows #10

Open
zeddo123 opened this issue Feb 8, 2024 · 0 comments
Open

[RFC] A multiplexfeature for Workflows #10

zeddo123 opened this issue Feb 8, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@zeddo123
Copy link
Member

zeddo123 commented Feb 8, 2024

When defining a workflow, in some cases the output received from a previous step needs to be iterated through and applied to the same processing/function.

let's say we have wf1, with a first step that returns a list of bboxes [[0, 0, 10, 10], [23, 23, 45, 33], ...]. Now, in our 2nd step we're running an inference on a model for each bbox supplied by the first step. This operation would take too long if the 2nd step is only implemented as a simple for loop (especially when running the pipeline needs to happen as quick as possible).

My proposition would be for octopipes to provide a "multiplex" function similar to the "add" function that takes care of running simultaneously the inputs of a previous step on the current step and then collecting the results when propagating them to the next steps (if present).

Here's an example of such a feature

wf = Workflow('wf1').add(load_data).multiplex(run_model, workers=3).add(post_process)
@zeddo123 zeddo123 added enhancement New feature or request good first issue Good for newcomers labels Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant