Skip to content

Remove the ability to pass worker kwargs to Submitter/Task.__call__() #789

Open
@tclose

Description

@tclose

This is a question I have been playing with in my head and think probably warrants discussion before we lock in the syntax. It is super convenient to be able to pass worker kwargs when executing tasks, e.g.

outputs = my_task(worker="cf", n_procs=2)

However, there is a risk of the worker kwargs (especially if they are in a plugin) clashing with the names of future kwargs we may want to add to the Submitter.__init__/Task.__call__ methods. Therefore, it would be cleaner/safer to just pass the worker object as

from pydra.workers.cf import ConcurrentFutures

outputs = my_task(worker=ConcurrentFutures(n_procs=2))

although more verbose and painful.

Thoughts?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

v1.0

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions