generating lammps potential file using create_lammps_model.py #744
Unanswered
michaelmacisaac
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hello, See that issue #741 it is the exact same problem, try the code I pasted. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I am wanting to use generate a LAMMPS model of one of the foundation models, but I am getting the error seen below. I have looked through the 'issues' and 'discussions', but couldnt find a suitable solution. If I missed it I apologize in advance.
Thanks for any and all help.
Command
python ~/mace/mace/cli/create_lammps_model.py mace-medium-density-agnesi-stress_cpu.model
Error:
python ~/mace/mace/cli/create_lammps_model.py mace-medium-density-agnesi-stress_cpu.model /blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/e3nn/o3/_wigner.py:10: FutureWarning: You are using
torch.loadwith
weights_only=False(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for
weights_onlywill be flipped to
True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via
torch.serialization.add_safe_globals. We recommend you start setting
weights_only=Truefor any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. _Jd, _W3j_flat, _W3j_indices = torch.load(os.path.join(os.path.dirname(__file__), 'constants.pt')) /home/michaelmacisaac/mace/mace/cli/create_lammps_model.py:66: FutureWarning: You are using
torch.loadwith
weights_only=False(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for
weights_onlywill be flipped to
True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via
torch.serialization.add_safe_globals. We recommend you start setting
weights_only=Truefor any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. model = torch.load( Only one head found in the model: default. Skipping selection. Traceback (most recent call last): File "/home/michaelmacisaac/mace/mace/cli/create_lammps_model.py", line 92, in <module> main() File "/home/michaelmacisaac/mace/mace/cli/create_lammps_model.py", line 87, in main lammps_model_compiled = jit.compile(lammps_model) File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/e3nn/util/jit.py", line 99, in compile compile( File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/e3nn/util/jit.py", line 99, in compile compile( File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/e3nn/util/jit.py", line 99, in compile compile( [Previous line repeated 1 more time] File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/e3nn/util/jit.py", line 111, in compile mod = torch.jit.script(mod, **script_options) File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/torch/jit/_script.py", line 1429, in script ret = _script_impl( File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/torch/jit/_script.py", line 1147, in _script_impl return torch.jit._recursive.create_script_module( File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/torch/jit/_recursive.py", line 557, in create_script_module return create_script_module_impl(nn_module, concrete_type, stubs_fn) File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl create_methods_and_properties_from_stubs( File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/torch/jit/_recursive.py", line 466, in create_methods_and_properties_from_stubs concrete_type._create_methods_and_properties( RuntimeError: Module 'reshape_irreps' has no attribute 'cueq_config' : File "/blue/subhash/michaelmacisaac/.conda/envs/mace_env/lib/python3.10/site-packages/mace/modules/irreps_tools.py", line 89 field = tensor[:, ix : ix + mul * d] # [batch, sample, mul * repr] ix += mul * d if hasattr(self, "cueq_config") and self.cueq_config is not None: ~~~~~~~~~~~~~~~~ <--- HERE if self.cueq_config.layout_str == "mul_ir": field = field.reshape(batch, mul, d)
Beta Was this translation helpful? Give feedback.
All reactions