Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多进程的一个问题 #43

Open
05Pikachu24 opened this issue Sep 24, 2024 · 0 comments
Open

多进程的一个问题 #43

05Pikachu24 opened this issue Sep 24, 2024 · 0 comments

Comments

@05Pikachu24
Copy link

Traceback (most recent call last):
File "C:\Users\20243\Desktop*\MMSA-FET-master\src\MSA_FET\dataset.py", line 420, in run_dataset
2024-09-24 22:00:48 - FET-Dataset - PID:17720 [ERROR] An Error Occured:
Traceback (most recent call last):
File "C:\Users\20243\Desktop*
\MMSA-FET-master\src\MSA_FET\dataset.py", line 420, in run_dataset
pool = mp_ctx.Pool( # 创建一个包含num_workers个进程的池
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\pool.py", line 212, in init
self._repopulate_pool()
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\pool.py", line 303, in _repopulate_pool
return self._repopulate_pool_static(self._ctx, self.Process,
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\pool.py", line 326, in _repopulate_pool_static
w.start()
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\popen_spawn_win32.py", line 45, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "D:\Anaconda\envs\extractMul\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "D:\Anaconda\envs\extractMul\lib\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.
pool = mp_ctx.Pool(   # 创建一个包含num_workers个进程的池
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant