Open utkarshp1161 opened 1 year ago
This looks like you've edited the code to include logging.debug
calls in the model?
Not that, but I have set up my python environment for nequip such that I am able to use pytroch 2.0 (unlike what is prescribed : PyTorch >= 1.8, !=1.9, <=1.11.*. PyTorch, due to hardware constraints and try few other things with torch geometric). I am able to train the nequip models in this setup but when trying to deploy the model getting this error. My goal is to do a md simulation on trained model and I thought that I could use NequIPCalculator.from_deployed_model(model, **kwargs). Is there a workaround such that I can do the md sim without having to deploy the model?
I see--- what hardware things? Please note the following upstream issue: https://github.com/mir-group/nequip/discussions/311. If you do or do not encounter this issue, please post in that thread so we can continue to try to resolve and understand this problem. Also please note that on AMD GPUs more recent versions of PyTorch appear to be fine.
Regarding torch_geometric
, that is no longer a dependency of nequip
, but maybe I am misinterpreting what you mean.
You could try 1.13? I've never seen this issue reported before... besides your PyTorch version, is there anything else custom or unusual about your setup? There should never be a call to logging.debug
in the model. Maybe the rest of the stack trace, which isn't included here, says where in the model it is?
Thank you, will try and get back with more details.
Can you please answer this: "My goal is to do a md simulation on trained model and I thought that I could use NequIPCalculator.from_deployed_model(model, **kwargs). Is there a workaround such that I can do the md sim without having to deploy the model?"
Actually I have already trained quite a number of models and since nequip-deploy is not working for them I am looking for some work around to complete my study without having to setup things again.
You could do inefficient MD by manually constructing NequIPCalculator
from an uncompiled PyTorch model (build using model_from_config
and .load_state_dict
and then passed to the constructor, rather than from_deployed_model
). This will loose you performance in a lot of places, however.
It is not possible to do MD in LAMMPS, OpenMM, etc. without deploying.
Thank you, will try and get back with more details.
Thanks. It's possible that there is a missing @torch.jit.unused
, in which case a quick code change will make it possible for you to deploy everything without retraining. (In general most code and version changes will not require retraining.)
You could do inefficient MD by manually constructing NequIPCalculator from an uncompiled PyTorch model (build using model_from_config and .load_state_dict and then passed to the constructor, rather than from_deployed_model).
Do I need to modify the calculate function in "class NequIPCalculator(Calculator)" if I use uncompiled PyTorch model?
No, you shouldn't need to.
No, you shouldn't need to.
cool
Describe the bug issue when using nequip-deploy
To Reproduce nequip-deploy build --train-dir model_path/ model_path/deployed_model.pth
ERROR: