burla.remote_parallel_map
Run an arbitrary python function on many computers at the same time.
remote_parallel_map(
function_,
inputs,
parallelism=-1,
func_cpu=1,
func_ram=1,
func_gpu=None,
verbose=False,
dockerfile=None,
packages=None,
api_key=None,
)
Run provided function_
on each item in inputs
at the same time, in the cloud, each on a separate CPU, up to 4000 CPUs. If more than 4000 inputs are provided, inputs are queued and processed sequentially on each worker.
By default, the local python environment is cloned on all remote machines. To prevent this pass packages=[]
.
Parameters | |
---|---|
Name | Description |
function_ |
Python function. Must have single input argument, eg: |
inputs |
Iterable of elements passable to |
parallelism |
(Optional) Target number of |
func_cpu |
(Optional) Number of CPU's available to every instance of |
func_ram |
(Optional) Amount of RAM (GB) available to every instance of |
func_gpu |
(Optional) GPU available to every instance of |
verbose |
(Optional) Set to |
dockerfile |
(Optional) Path to dockerfile. If present, and never seen before, a docker image is built, and all instances of |
packages |
(Optional) Iterable containing names of pipy packages to install in environments where |
api_key |
(Optional) API key, for use in deployment environments where |
Returns | |
---|---|
Type | Description |
List | List of objects returned by |
Questions?
Schedule a call with us, or email us. We're always happy to talk.