Skip to content

python 3.9 issue #189

@moghadas76

Description

@moghadas76

Traceback (most recent call last):
File "", line 1, in
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 288, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/seyed/forked/pytorch-ts/run.py", line 41, in
predictor = estimator.train(training_data=training_data, num_workers=4)
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 179, in train
return self.train_model(
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 151, in train_model
self.trainer(
File "/home/seyed/forked/pytorch-ts/pts/trainer.py", line 62, in call
with tqdm(train_iter, total=total) as it:
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/tqdm/asyncio.py", line 33, in init
self.iterable_iterator = iter(iterable)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 493, in iter
return self._get_iterator()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 424, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1171, in init
w.start()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

0%| | 0/49 [00:00<?, ?it/s]
0%| | 0/49 [00:00<?, ?it/s]Traceback (most recent call last):
File "", line 1, in
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 288, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/seyed/forked/pytorch-ts/run.py", line 41, in
predictor = estimator.train(training_data=training_data, num_workers=4)
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 179, in train
return self.train_model(
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 151, in train_model
self.trainer(
File "/home/seyed/forked/pytorch-ts/pts/trainer.py", line 62, in call
with tqdm(train_iter, total=total) as it:
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/tqdm/asyncio.py", line 33, in init
self.iterable_iterator = iter(iterable)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 493, in iter
return self._get_iterator()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 424, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1171, in init
w.start()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

0%| | 0/49 [00:00<?, ?it/s]
0%| | 0/49 [00:00<?, ?it/s]Traceback (most recent call last):
File "", line 1, in
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 288, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/seyed/forked/pytorch-ts/run.py", line 41, in
predictor = estimator.train(training_data=training_data, num_workers=4)
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 179, in train
return self.train_model(
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 151, in train_model
self.trainer(
File "/home/seyed/forked/pytorch-ts/pts/trainer.py", line 62, in call
with tqdm(train_iter, total=total) as it:
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/tqdm/asyncio.py", line 33, in init
self.iterable_iterator = iter(iterable)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 493, in iter
return self._get_iterator()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 424, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1171, in init
w.start()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

0%| | 0/49 [00:00<?, ?it/s]
0%| | 0/49 [00:03<?, ?it/s]
Traceback (most recent call last):
File "/home/seyed/forked/pytorch-ts/run.py", line 41, in
predictor = estimator.train(training_data=training_data, num_workers=4)
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 179, in train
return self.train_model(
File "/home/seyed/forked/pytorch-ts/pts/model/estimator.py", line 151, in train_model
self.trainer(
File "/home/seyed/forked/pytorch-ts/pts/trainer.py", line 63, in call
for batch_no, data_entry in enumerate(it, start=1):
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/tqdm/std.py", line 1181, in iter
for obj in iterable:
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 733, in next
data = self._next_data()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1491, in _next_data
idx, data = self._get_data()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1443, in _get_data
success, data = self._try_get_data()
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1284, in _try_get_data
data = self._data_queue.get(timeout=timeout)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/queue.py", line 180, in get
self.not_empty.wait(remaining)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/threading.py", line 316, in wait
gotit = waiter.acquire(True, timeout)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/_utils/signal_handling.py", line 73, in handler
_error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 3346127) exited unexpectedly with exit code 1. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/multiprocessing/popen_fork.py", line 27, in poll
pid, sts = os.waitpid(self.pid, flag)
File "/home/seyed/forked/pytorch-ts/.conda/lib/python3.9/site-packages/torch/utils/data/_utils/signal_handling.py", line 73, in handler
_error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 3346134) is killed by signal: Terminated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions