CDAT/cdp

Make cdp_run work without Parameters

Closed this issue · 1 comments

We currently need to have a list of Parameters objects as the arguments like so:

# each args needs a num_worker attribute. scheduler_addr is needed for distributed running
args = [Parameter() for _ in range(10)]  
results = cdp.cdp_run.multiprocess(func, args) 
results = cdp.cdp_run.distribute(func, args) 

Instead we should do something like this for general computation:

args = range(10)  # just a list, no Parameters object
results = cdp.cdp_run.multiprocess(func, args, num_workers=8) 
results = cdp.cdp_run.distribute(func, args, scheduler_addr='10.10.10.1:8786',  num_workers=8) 

Fixed in a9d422a