-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
9 additions
and
31 deletions.
There are no files selected for viewing
15 changes: 9 additions & 6 deletions
15
smartschedule/planning/parallelization/stage_parallelization.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
from smartschedule.planning.parallelization.parallel_stages_list import ( | ||
ParallelStagesList, | ||
) | ||
from smartschedule.planning.parallelization.sorted_nodes_to_parallelized_stages import ( | ||
sorted_nodes_to_parallelized_stages, | ||
) | ||
from smartschedule.planning.parallelization.stage import Stage | ||
from smartschedule.planning.parallelization.stages_to_nodes import stages_to_nodes | ||
from smartschedule.sorter import graph_topological_sort | ||
from smartschedule.utils.pipe import pipe | ||
|
||
stage_parallelization_of = pipe( | ||
stages_to_nodes, | ||
graph_topological_sort, | ||
sorted_nodes_to_parallelized_stages, | ||
) | ||
|
||
def stage_parallelization_of(stages: set[Stage]) -> ParallelStagesList: | ||
nodes = stages_to_nodes(stages) | ||
sorted_nodes = graph_topological_sort(nodes) | ||
return sorted_nodes_to_parallelized_stages(sorted_nodes) |
Empty file.
This file was deleted.
Oops, something went wrong.