Skip to content

Commit

Permalink
FEAT-modin-project#5809: New implementation of the Ray lazy execution…
Browse files Browse the repository at this point in the history
… queue

Signed-off-by: Andrey Pavlenko <andrey.a.pavlenko@gmail.com>
  • Loading branch information
AndreyPavlenko committed Nov 8, 2023
1 parent bb94bbe commit e144ba5
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 173 deletions.
12 changes: 11 additions & 1 deletion modin/core/execution/ray/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ def deconstruct_call_queue(call_queue):
kw_value_lengths = []
unfolded_queue = []
for call in call_queue:
if isinstance(call, int):
unfolded_queue.append(call)
continue
unfolded_queue.append(call[0])
unfolded_queue.extend(call[1])
arg_lengths.append(len(call[1]))
Expand Down Expand Up @@ -379,8 +382,15 @@ def take_n_items(n):
return res

call_queue = []
for i in range(num_funcs):
idx_shift = 0
for idx in range(num_funcs):
func = take_n_items(1)[0]
if isinstance(func, int):
call_queue.append(func)
idx_shift += 1
continue

i = idx - idx_shift
args = take_n_items(arg_lengths[i])
kw_keys = take_n_items(kw_key_lengths[i])
kwargs = {}
Expand Down

0 comments on commit e144ba5

Please sign in to comment.