Skip to content

Commit

Permalink
Rename to pick_best
Browse files Browse the repository at this point in the history
  • Loading branch information
merschformann committed Sep 27, 2024
1 parent 4ee9ac4 commit bb252c1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions examples/pipeline-complex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ graph TD
run_nextroute_2(run_nextroute_2)
run_nextroute --> run_nextroute_2
run_nextroute_2 --> run_nextroute_join
run_nextroute_join --> aggregate_results
run_nextroute_join --> pick_best
run_ortools(run_ortools)
run_ortools --> aggregate_results
run_ortools --> pick_best
run_pyvroom(run_pyvroom)
run_pyvroom --> aggregate_results
aggregate_results(aggregate_results)
run_pyvroom --> pick_best
pick_best(pick_best)
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions examples/pipeline-complex/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_pyvroom():

@needs(predecessors=[run_nextroute, run_ortools, run_pyvroom])
@step
def aggregate_results(
def pick_best(
results_nextroute: list[dict],
result_ortools: dict,
result_pyvroom: dict,
Expand All @@ -67,7 +67,7 @@ def main():
# Run workflow
flow = Flow("DecisionFlow", None)
flow.run()
result = flow.get_result(flow.aggregate_results)
result = flow.get_result(flow.pick_best)
print(json.dumps(result))


Expand Down
4 changes: 2 additions & 2 deletions examples/pipeline-ensemble/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ graph TD
run_nextroute_2(run_nextroute_2)
run_nextroute --> run_nextroute_2
run_nextroute_2 --> run_nextroute_join
run_nextroute_join --> aggregate_results
aggregate_results(aggregate_results)
run_nextroute_join --> pick_best
pick_best(pick_best)
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions examples/pipeline-ensemble/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def run_nextroute():

@needs(predecessors=[run_nextroute])
@step
def aggregate_results(results: list[dict]):
def pick_best(results: list[dict]):
"""Aggregates the results."""
best_solution_idx = min(
range(len(results)),
Expand All @@ -41,7 +41,7 @@ def main():
# Run workflow
flow = Flow("DecisionFlow", input.data)
flow.run()
result = flow.get_result(flow.aggregate_results)
result = flow.get_result(flow.pick_best)
print(json.dumps(result))


Expand Down

0 comments on commit bb252c1

Please sign in to comment.