IIIS-Li-Group / OpenFE

OpenFE: automated feature generation with expert-level performance
MIT License
781 stars 99 forks source link

运行报错 #9

Closed ni-i-i closed 1 year ago

ni-i-i commented 1 year ago

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.

25%|█████████████████████ | 1/4 [00:04<00:14, 4.81s/it]

ZhangTP1996 commented 1 year ago

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.

25%|█████████████████████ | 1/4 [00:04<00:14, 4.81s/it]

It seems that the problem is due to the multiprocessing in the Windows system. There are two ways to solve this problem: 1) run the code on a Linux system. 2) include the if __name__ == '__main__': in the codes.

ni-i-i commented 1 year ago

include the if name == 'main': in the codes. --is work in windows 10,python 3.9(conda env) ,thanks。