8000 Fix DaskWorker: `AttributeError: 'tuple' object has no attribute '_run'` by adi611 · Pull Request #673 · nipype/pydra · GitHub
[go: up one dir, main page]

Skip to content

Fix DaskWorker: AttributeError: 'tuple' object has no attribute '_run' #673

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

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix daskworker attributeerror #665
  • Loading branch information
adi611 authored and ghisvail committed Aug 10, 2023
commit 8963e276ba5ea23be8f1579e23f2599cf2b9c74c
10 changes: 8 additions & 2 deletions pydra/engine/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,14 @@ async def exec_dask(self, runnable, rerun=False):
from dask.distributed import Client

self.client = await Client(**self.client_args, asynchronous=True)
future = self.client.submit(runnable._run, rerun)
result = await future

if isinstance(runnable, TaskBase):
future = self.client.submit(runnable._run, rerun)
result = await future
else: # it could be tuple that includes pickle files with tasks and inputs
ind, task_main_pkl, task_orig = runnable
future = self.client.submit(load_and_run, task_main_pkl, ind, rerun)
result = await future
return result

def close(self):
Expand Down
0