mir-group / nequip

NequIP is a code for building E(3)-equivariant interatomic potentials
https://www.nature.com/articles/s41467-022-29939-5
MIT License
565 stars 124 forks source link

RuntimeError when using nequip-evaluate #318

Closed vaidishs closed 1 year ago

vaidishs commented 1 year ago

I'm trying to use nequip-evaluate with a different dataset read through a yaml file and with a deployed potential using the command:

nequip-evaluate --model deployed_it9.pth --dataset-config predict.yaml --output bulk_nn.xyz --batch-size 1

It command runs for a few configurations of data and then gives an error:

Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/py/bin/nequip-evaluate", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/envs/py/lib/python3.9/site-packages/nequip/scripts/evaluate.py", line 372, in main
    out = model(AtomicData.to_AtomicDataDict(batch))
  File "/home/ubuntu/anaconda3/envs/py/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: Unsupported value kind: Tensor
Linux-cpp-lisp commented 1 year ago

Hi @vaidishs ,

This is a known PyTorch bug we can trigger on PyTorch 1.10 that should be resolved by using 1.11 (see https://github.com/mir-group/allegro/issues/6)

vaidishs commented 1 year ago

Perfect. This fixed it. Thanks for the promo response.