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

Traverse the DataPipeGraph in in a breadth-first order rather than depth-first order in traverse_dps #898

Closed
NivekT opened this issue Nov 15, 2022 · 3 comments

Comments

@NivekT
Copy link
Contributor

NivekT commented Nov 15, 2022

🚀 The feature

Traverse the DataPipeGraph in in a breadth-first order rather than depth-first order in traverse_dps

Motivation, pitch

In cases such as pausing or stopping, a bread-first order will ensure that consumer DataPipes (i.e. DataPipes consuming data from other DataPipes) stop before producer DataPipes.

Alternatives

No response

Additional context

cc: @ejguan

@ejguan
Copy link
Contributor

ejguan commented Nov 16, 2022

After thinking deeply on this topic, I think it's not traverse_dps should be breadth-first order because the returned graph is the same no matter it's traversed in BFS or DFS.

I think you are requesting list_dps using BFS rather than DFS. So, the DataPipes with smaller depth should be in the front of returned list. WDYT?

@ejguan
Copy link
Contributor

ejguan commented Nov 16, 2022

Will update list_dps in #894

@ejguan
Copy link
Contributor

ejguan commented Nov 18, 2022

Closing as #894 has been landed.

@ejguan ejguan closed this as completed Nov 18, 2022
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

No branches or pull requests

2 participants