unidist icon indicating copy to clipboard operation
unidist copied to clipboard

All tests related to actors are failed for `multiprocessing` backend on Windows

Open prutskov opened this issue 3 years ago • 0 comments

Testing of actor for multiprocessing backend on Windows throwed the next errors:

    @pytest.mark.parametrize("is_use_options", [True, False])
    def test_address_space(is_use_options):
>       actor0 = TestActor.options().remote(0) if is_use_options else TestActor.remote(0)

unidist\test\test_actor.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
unidist\core\base\actor.py:189: in remote
    actor_cls = self._actor_cls(*self._actor_cls_args)._remote(*args, **kwargs)
unidist\core\backends\multiprocessing\actor.py:132: in _remote
    self._actor_handle = mp.Actor(self._cls, *args, **kwargs)
unidist\core\backends\multiprocessing\core\actor.py:107: in __init__
    manager.start()
..\..\.conda\envs\unidist\lib\multiprocessing\managers.py:579: in start
    self._process.start()
..\..\.conda\envs\unidist\lib\multiprocessing\process.py:121: in start
    self._popen = self._Popen(self)
..\..\.conda\envs\unidist\lib\multiprocessing\context.py:327: in _Popen
    return Popen(process_obj)
..\..\.conda\envs\unidist\lib\multiprocessing\popen_spawn_win32.py:93: in __init__
    reduction.dump(process_obj, to_child)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <SpawnProcess name='BaseManager-15' parent=22516 initial>, file = <_io.BufferedWriter name=14>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <class 'unidist.test.utils.TestActor'>: it's not the same object as unidist.test.utils.TestActor

..\..\.conda\envs\unidist\lib\multiprocessing\reduction.py:60: PicklingError

prutskov avatar Dec 07 '21 14:12 prutskov