MCPcopy Create free account
hub / github.com/dask/dask / get_target

Function get_target

dask/order.py:431–445  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

429 leafs_per_degree[degree].add(leaf)
430
431 def get_target() -> Key:
432 # If we're already mid run and there is a runnable_hull we'll attempt to
433 # pick the next target in a way that minimizes the number of additional
434 # root nodes that are needed
435 all_leafs_accessible = min_leaf_degree == max_leaf_degree
436 is_trivial_lookup = not reachable_hull or all_leafs_accessible
437 if not is_trivial_lookup:
438 candidates = reachable_hull & leafs_per_degree[min_leaf_degree]
439 if not candidates:
440 candidates = leafs_per_degree[min_leaf_degree]
441 # Even without reachable hull overlap this should be relatively
442 # small so one full pass should be fine
443 return min(candidates, key=sort_key)
444 else:
445 return leaf_nodes_sorted.pop()
446
447 def use_longest_path() -> bool:
448 size = 0

Callers 1

orderFunction · 0.85

Calls 2

minFunction · 0.85
popMethod · 0.80

Tested by

no test coverage detected