uci-cbcl / UFold

MIT License
58 stars 26 forks source link

AttributeError when training data #23

Open laiyii opened 1 year ago

laiyii commented 1 year ago

Dear developer, I get an error when training data:

AttributeError: Can't get attribute 'RNA_SS_data' on <module '__mp_main__' from 'D:\\大四\\上学期\\机器学习及其在化学中的应用\\大作业\\workdir\\ufold_train.py'>

The file related to '__mp_main__' is "C:\Users\fly\anaconda3\lib\multiprocessing\spawn.py", it seems like a multiprocessing error, could you please help me with this problem? Thank you!

laiyii commented 1 year ago

I'm running with cpu)

sperfu commented 1 year ago

Hi there,

You may refer to (https://github.com/uci-cbcl/UFold/blob/5f2be9c1ccb3fc01869dccb5bb8a180a2740c6f9/ufold/data_generator.py#L32) and (https://github.com/uci-cbcl/UFold/blob/5f2be9c1ccb3fc01869dccb5bb8a180a2740c6f9/ufold/data_generator.py#L47) to change this to single core, but be aware that it will result in lower running time.

laiyii commented 1 year ago

Thanks for your quick reply🌹 While I'm a beginner, still confused about how to change this to single core, could you please show me more details? Thank you.

laiyii commented 1 year ago

I find the AttributeError results from windows system, the Pool.map function is failed (https://medium.com/@grvsinghal/speed-up-your-python-code-using-multiprocessing-on-windows-and-jupyter-or-ipython-2714b49d6fac) it goes well when using linux.