redmod-team / profit

Probabilistic Response mOdel Fitting with Interactive Tools
https://profit.readthedocs.io
MIT License
14 stars 9 forks source link

Problem with `mockup.py` on macos #146

Open krystophny opened 3 years ago

krystophny commented 3 years ago

In examples we get the following error on macos Big Sur. Adding fork = false in profit.yaml runner section works.

/Users/ert/src/profit/profit/config.py:69: UserWarning: Config parameter 'plot' for FitConfig configuration may be unused.
  warnings.warn(message)
^M  0%|          | 0/30 [00:00<?, ?it/s]Namespace(base_dir='/Users/ert/src/profit/examples/mockup/study', mode='run')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
Rykath commented 2 years ago

We could set the default for fork to False if macOS is detected (in defaults.py)

something along the lines of:

import platform
run_runner_local[‘fork’] = platform.system() != ‘Darwin’