Skip to content

Commit 8e46d2f

Browse files
committed
tuning: fix thread counts
1 parent 3170dcd commit 8e46d2f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/lenskit/tuning/_search.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ def setup_harness(self):
217217

218218
match self.spec.search.num_cpus:
219219
case "threads":
220+
tune_cpus = paracfg.num_threads or 1
221+
case "backend-threads":
220222
tune_cpus = paracfg.num_backend_threads or 1
221223
case "all-threads":
222224
tune_cpus = paracfg.total_threads

src/lenskit/tuning/spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class SearchConfig(BaseModel):
5050
"""
5151
The length of recommendation lists to use.
5252
"""
53-
num_cpus: int | Literal["threads", "all-threads"] = "threads"
53+
num_cpus: int | Literal["threads", "backend-threads", "all-threads"] = "threads"
5454
"""
5555
The number of CPUs to request from Ray Tune.
5656
"""

0 commit comments

Comments
 (0)