Skip to content

Implement cdp.run.auto #20

Open
Open
@zshaheen

Description

@zshaheen

For users that want a single function that can automatically choose to run in serial, or parallel with multiprocessing/distributed running.

cdp.cdp_run.auto(func, args) will look at the attributes of the first args and run the following functions based on the requirements:

  • If num_workers is only given, run with cdp.cdp_run.multiprocess()
  • If scheduler_addr is given regardless of anything else, run cdp.cdp_run.distribute()
  • If neither num_workers or scheduler_addr is given, run in serial with cdp.cdp_run.serial()

Just like #19, make sure that this works with non-Parameters lists as well. So have something like this:

cdp.cdp_run(func, args, num_workers=None, scheduler_addr=None)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions