Ray
RayParallelBackend(config)
¶
Bases: BaseParallelBackend
Class used to wrap ray to make it transparent to algorithms.
It shouldn't be initialized directly. You should instead call init_parallel_backend().
| PARAMETER | DESCRIPTION |
|---|---|
config |
instance of ParallelConfig with cluster address, number of cpus, etc.
TYPE:
|
Source code in src/pydvl/utils/parallel/backends/ray.py
wrap(fun, **kwargs)
¶
Wraps a function as a ray remote.
| PARAMETER | DESCRIPTION |
|---|---|
fun |
the function to wrap
TYPE:
|
kwargs |
keyword arguments to pass to @ray.remote
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Callable
|
The |
Source code in src/pydvl/utils/parallel/backends/ray.py
Last update:
2023-09-02
Created: 2023-09-02
Created: 2023-09-02