Skip to content

Commit f2d1e4e

Browse files
committed
use chunksize=1 for dynesty's pool
1 parent a16b2bf commit f2d1e4e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
### Added
99
### Changed
1010
- When restoring the sampler with the pool, try to use an updated value of queue_size based on pool size
11+
- Use chunksize=1 for dynesty pool as that is better behaved for queue_size>nthreads and unequal duration of function evaluations
1112
### Fixed
1213

1314
[3.0.0 - 2025-10-04]

py/dynesty/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def map(self, F, x):
154154
F: function
155155
x: iterable
156156
"""
157-
return self.pool.map(F, x)
157+
return self.pool.map(F, x, chunksize=1)
158158

159159
def __exit__(self, exc_type, exc_val, exc_tb):
160160
try:

0 commit comments

Comments
 (0)