0

I am using Pathos for parallelism: https://pypi.org/project/pathos/ All good except when instantiating the Pool I get some annoying error messages.

from pathos.multiprocessing import ProcessingPool as Pool
p = Pool().map    #<--This line spits out four lines to console:

"ERROR:root:<class 'RuntimeError'>" 

#(I have four CPUs, so I guess one each)

Seems everything is working fine. These four errors are just little annoying but it's not interfering with anything else.

Anyway I can silent these error messages from printing to console?

Bill Armstrong
  • 1,615
  • 3
  • 23
  • 47

2 Answers2

0

I'm the pathos author. It looks more like a logging module error. I don't know your exact python version and whatnot but I expect something like this is the root cause:

>>> import logging
>>> logging.error(RuntimeError)
ERROR:root:<type 'exceptions.RuntimeError'>

No idea why you'd be seeing that from pathos. However, if it's not spurious and you want to dig into it further, you should post an issue on the pathos GitHub page.

https://github.com/uqfoundation/pathos/issues

Mike McKerns
  • 33,715
  • 8
  • 119
  • 139
0

Thanks Mike, The error goes away, after I added:

if __name__ ==  '__main__'

Before calling:

pool = Pool().imap

REF: RuntimeError on windows trying python multiprocessing