Closed sxy759334746 closed 10 months ago
The actual mistake is that i did not download the data correctly.
File "/home/jijinglong/anaconda3/envs/sch116/lib/python3.10/site-packages/schnetpack_gschnet/datasets/qm9.py", line 288, in _download_data irange = np.arange(len(ordered_files), dtype=np.int)
The len(ordered_files) is a int number or ampty. Am i right? But i checked the tmp files and they are downloaded correctly in the tmp directory. What should i do?
Hi @sxy759334746 ,
thank you for reporting this issue! You were not doing anything wrong.
We were still using the deprecated type np.int
in our download script. I replaced it with int
in my last commit which should fix the problem.
Please pull the newest version of the repository and re-install the package in your environment (or delete the old environment and follow the instructions in the readme from the beginning to create a new one). Let me know if this does not work!
Best regards,
Niklas
Dear author, This is great work which i want to follow. However, i have a problem when i follow the readme to start training with default config. The output is like:
[2023-11-06 21:14:40,431][root][INFO] - Parse xyz files... Error executing job with overrides: ['experiment=gschnet_qm9'] Traceback (most recent call last): File "/home/jijinglong/anaconda3/envs/sch116/lib/python3.10/site-packages/schnetpack/cli.py", line 158, in train trainer.fit(model=task, datamodule=datamodule, ckpt_path=config.run.ckpt_path) File "/home/jijinglong/anaconda3/envs/sch116/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 545, in fit call._call_and_handle_interrupt(
......
File "/home/jijinglong/anaconda3/envs/sch116/lib/python3.10/site-packages/schnetpack_gschnet/datasets/qm9.py", line 218, in prepare_data self._download_data(tmpdir, dataset, uncharacterized=uncharacterized) File "/home/jijinglong/anaconda3/envs/sch116/lib/python3.10/site-packages/schnetpack_gschnet/datasets/qm9.py", line 288, in _download_data irange = np.arange(len(ordered_files), dtype=np.int) File "/home/jijinglong/anaconda3/envs/sch116/lib/python3.10/site-packages/numpy/init.py", line 305, in getattr raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtinint
. To avoid this error in existing code, useint
by itself.I noticed that the error happened when downloading the training data. Compared to demo cli , I just use ”cp -r“ to create a new config directory. I was confused why it use a remote package with the same name called schnetpack_gschnet in "python3.10/site-packages/schnetpack_gschnet" rather than call the func from my local project which i cloned from this repo.
I do not know what this remote pack work for and how can it influence the program.
Now i want to debug but i have to change the remote pack rather than local program. It seems like unreasonable. And i do not know what mistake i made. I would appreciate it if you can help me about this. Looking forward to your reply.
Many thanks.