isayevlab / AIMNet2

75 stars 22 forks source link

Error loading the model on CPU #2

Closed leelasd closed 11 months ago

leelasd commented 11 months 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 11 months ago

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

leelasd commented 11 months ago

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