Skip to content

Commit e23256b

Browse files
Add instructions about init_parallel_backend
1 parent b0a7a49 commit e23256b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/getting-started/advanced-usage.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ of executors for the different algorithms: the first uses a map reduce pattern a
4242
the [MapReduceJob][pydvl.parallel.map_reduce.MapReduceJob] class
4343
and the second implements the futures executor interface from [concurrent.futures][].
4444

45+
As a convenience, you can also instantiate a parallel backend class
46+
by using the [init_parallel_backend][pydvl.parallel.init_parallel_backend]
47+
function:
48+
49+
```python
50+
from pydvl.parallel import init_parallel_backend
51+
parallel_backend = init_parallel_backend(backend_name="joblib")
52+
```
53+
4554
!!! info
4655

4756
The executor classes are not meant to be instantiated and used by users

0 commit comments

Comments
 (0)