Skip to content

Commit

Permalink
Merge 3313a6c into 3a2a765
Browse files Browse the repository at this point in the history
  • Loading branch information
fonnesbeck committed Aug 16, 2019
2 parents 3a2a765 + 3313a6c commit 8047c15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 3 additions & 0 deletions RELEASE-NOTES.md
Expand Up @@ -15,6 +15,9 @@
- Parallelization of population steppers (`DEMetropolis`) is now set via the `cores` argument. ([#3559](https://github.com/pymc-devs/pymc3/pull/3559))
- SMC: stabilize covariance matrix [3573](https://github.com/pymc-devs/pymc3/pull/3573)
- SMC is no longer a step method of `pm.sample` now it should be called using `pm.sample_smc` [3579](https://github.com/pymc-devs/pymc3/pull/3579)
- Now uses `multiprocessong` rather than `psutil` to count CPUs, which results in reliable core counts on Chromebooks.



## PyMC3 3.7 (May 29 2019)

Expand Down
11 changes: 3 additions & 8 deletions pymc3/parallel_sampling.py
Expand Up @@ -433,14 +433,9 @@ def _cpu_count():
If not, we use the number provided by multiprocessing, but assume
that half of the cpus are only hardware threads and ignore those.
"""
import multiprocessing
try:
import psutil
cpus = psutil.cpu_count(False)
except ImportError:
try:
cpus = multiprocessing.cpu_count() // 2
except NotImplementedError:
cpus = 1
if cpus is None:
cpus = multiprocessing.cpu_count() // 2
except NotImplementedError:
cpus = 1
return cpus

0 comments on commit 8047c15

Please sign in to comment.