Closed gengzhx closed 2 months ago
Dear @gengzhx ,
I think the error is caused by the implementation of pickle on Windows. It seems it cannot pickle lambda functions (see here).
I have an idea how to fix this but unfortunately I don't have time to implement and test this right away. As a workaround, can you please try to add ++data.num_preprocessing_workers=0
to your call and report whether this solves the problem?
So your call should be:
python C:\Users\gengzhx\Desktop\schnetpack-gschnet-main\src\scripts\train.py --config-dir=C:\Users\gengzhx\Desktop\schnetpack-gschnet-main\src\schnetpack_gschnet\configs experiment=gschnet_qm9 ++data.num_preprocessing_workers=0
Kind regards, Niklas
@NiklasGebauer Thank you very much for your detailed response.Your suggestion was very helpful, and after disabling multithreading, the code ran successfully. I overlooked the fact that the computing system itself could be the most crucial running environment. Thanks again for your excellent help and support.
@gengzhx Perfect, thanks for the feedback! I'm glad this helped. I will leave this issue open for now as a reminder to implement a fix that allows to use multithreading with Windows.
I replaced the lambda call with a locally defined function and think this should fix the issue. Since I am not using Windows I cannot test it, so if the error still persists, please reopen the issue :)
Hello,when I tired to run your sample code in Windows ,the following problem occured:
KeyError raised while resolving interpolation: "Environment variable 'PWD' not found
After adding os.environ['PWD'] = 'any' in the train.py file, the program reported an error after downloading the Qm9.db file and outputting :Setting up training data - checking connectivity of molecules using covalent radii from ASE with a factor of 1.1 and a maximum neighbor distance (i.e. placement cutoff) of 1.7.
The Error is:I reconfigured the environment and successfully ran the sample code you gave in the schnetpack2.0 package, but the above error still occurred when running the gschnet_qm9 example in gschnet.
My input in the command line is:
python C:\Users\gengzhx\Desktop\schnetpack-gschnet-main\src\scripts\train.py --config-dir=C:\Users\gengzhx\Desktop\schnetpack-gschnet-main\src\schnetpack_gschnet\configs experiment=gschnet_qm9
My environment is:
How should I solve the above problem? Please give me some advice. Thanks a million.