Skip to content

Commit 16748b7

Browse files
Insert memory_limit parameter into LocalCluster docstring (#6839)
1 parent 2bdb456 commit 16748b7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

distributed/deploy/local.py

+13
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ class LocalCluster(SpecCluster):
3030
----------
3131
n_workers: int
3232
Number of workers to start
33+
memory_limit: str, float, int, or None, default "auto"
34+
Sets the memory limit *per worker*.
35+
36+
Notes regarding argument data type:
37+
38+
* If None or 0, no limit is applied.
39+
* If "auto", the total system memory is split evenly between the workers.
40+
* If a float, that fraction of the system memory is used *per worker*.
41+
* If a string giving a number of bytes (like ``"1GiB"``), that amount is used *per worker*.
42+
* If an int, that number of bytes is used *per worker*.
43+
44+
Note that the limit will only be enforced when ``processes=True``, and the limit is only
45+
enforced on a best-effort basis — it's still possible for workers to exceed this limit.
3346
processes: bool
3447
Whether to use processes (True) or threads (False). Defaults to True, unless
3548
worker_class=Worker, in which case it defaults to False.

0 commit comments

Comments
 (0)