isayevlab / AIMNet2

MIT License
96 stars 25 forks source link

Error loading the model on CPU #2

Closed leelasd closed 1 year ago

leelasd commented 1 year ago

Hi,

When I try to run the model on Mac CPU, I am getting the following errors. Here is the command I used

python aimnet2_ase_opt.py ../models/aimnet2_wb97m-d3_0.jpt test.xyz out.xyz --charge 0 --traj trj.xyz

The error is as below

Loading AIMNet2 model from file ../models/aimnet2_wb97m-d3_0.jpt
Traceback (most recent call last):
  File "aimnet2_ase_opt.py", line 74, in <module>
    model = torch.jit.load(args.model, map_location=device)
  File "/opt/anaconda3/envs/delfta/lib/python3.7/site-packages/torch/jit/_serialization.py", line 161, in load
    cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)
RuntimeError: [enforce fail at inline_container.cc:222] . file not found: wb97m_gas_0/version

I am using PyTorch 1.8.0

zubatyuk commented 1 year ago

You have to switch to a recent PyTorch 2.x version.

leelasd commented 1 year ago

Thank you so much for the advice ! That worked :)