SymINDy icon indicating copy to clipboard operation
SymINDy copied to clipboard

Parallelization does not work

Open andreikitaitsev opened this issue 2 years ago • 1 comments

Using Scoop in a manner described at DEAP page does not work. Error message:

ImportError: cannot import name 'Iterable' from 'collections' (C:\Users\AndreiKitaitsev\AppData\Local\Programs\Python\Python310\lib\collections_init_.py) toolbox, creator, history = _create_toolbox(pset, ntrees, max_depth=self.max_depth) File "c:\users\andreikitaitsev\documents\sind_and_symbolic_regression\symindy\symindy\symindy.py", line 133, in _create_toolbox from scoop import futures File "C:\Users\AndreiKitaitsev\Documents\SIND_and_symbolic_regression\env1\lib\site-packages\scoop\futures.py", line 19, in toolbox, creator, pset, history = self.configure_DEAP( toolbox, creator, history = _create_toolbox(pset, ntrees, max_depth=self.max_depth) File "c:\users\andreikitaitsev\documents\sind_and_symbolic_regression\symindy\symindy\symindy.py", line 133, in create_toolbox File "c:\users\andreikitaitsev\documents\sind_and_symbolic_regression\symindy\symindy\symindy.py", line 154, in configure_DEAP from scoop import futures File "C:\Users\AndreiKitaitsev\Documents\SIND_and_symbolic_regression\env1\lib\site-packages\scoop\futures.py", line 19, in from collections import namedtuple, Iterable ImportError: cannot import name 'Iterable' from 'collections' (C:\Users\AndreiKitaitsev\AppData\Local\Programs\Python\Python310\lib\collections_init.py) toolbox, creator, history = create_toolbox(pset, ntrees, max_depth=self.max_depth) File "c:\users\andreikitaitsev\documents\sind_and_symbolic_regression\symindy\symindy\symindy.py", line 133, in create_toolbox from scoop import futures File "C:\Users\AndreiKitaitsev\Documents\SIND_and_symbolic_regression\env1\lib\site-packages\scoop\futures.py", line 19, in from collections import namedtuple, Iterable ImportError: cannot import name 'Iterable' from 'collections' (C:\Users\AndreiKitaitsev\AppData\Local\Programs\Python\Python310\lib\collections_init.py) from collections import namedtuple, Iterable ImportError: cannot import name 'Iterable' from 'collections' (C:\Users\AndreiKitaitsev\AppData\Local\Programs\Python\Python310\lib\collections_init.py) [2022-05-25 15:50:37,313] launcher (127.0.0.1:60684) INFO Root process is done. [2022-05-25 15:50:37,314] launcher (127.0.0.1:60684) INFO Finished cleaning spawned subprocesses.

Launching multiprocessing Pool requires running the module as main.

andreikitaitsev avatar May 25 '22 13:05 andreikitaitsev

Consider ignoring scoop and use something like this

matteoettam09 avatar Jun 09 '22 18:06 matteoettam09