You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/jz748/codes/deepmd-kit/deepmd/pt/utils/neighbor_stat.py", line 137, in __init__
self.op = torch.jit.script(op)
File "/home/jz748/anaconda3/lib/python3.10/site-packages/torch/jit/_script.py", line 1324, in script
return torch.jit._recursive.create_script_module(
File "/home/jz748/anaconda3/lib/python3.10/site-packages/torch/jit/_recursive.py", line 559, in create_script_module
return create_script_module_impl(nn_module, concrete_type, stubs_fn)
File "/home/jz748/anaconda3/lib/python3.10/site-packages/torch/jit/_recursive.py", line 636, in create_script_module_impl
create_methods_and_properties_from_stubs(
File "/home/jz748/anaconda3/lib/python3.10/site-packages/torch/jit/_recursive.py", line 469, in create_methods_and_properties_from_stubs
concrete_type._create_methods_and_properties(
RuntimeError:
extend_coord_with_ghosts(Tensor coord, Tensor atype, Tensor? cell, float rcut, Tensor? cell_cpu=None) -> ((Tensor, Tensor, Tensor)):
Expected a value of type 'float' for argument 'rcut' but instead found type 'int'.
:
File "/home/jz748/codes/deepmd-kit/deepmd/pt/utils/neighbor_stat.py", line 79
nloc = coord.shape[1]
coord = coord.view(nframes, nloc * 3)
extend_coord, extend_atype, _ = extend_coord_with_ghosts(
~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
coord, atype, cell, self.rcut
)
Steps to Reproduce
cd examples/water/se_e2_a
In input.json, change "rcut": 6.00 to "rcut": 6.
dp --pt train input.json
Further Information, Files, and Links
No response
The text was updated successfully, but these errors were encountered:
Fix#3974.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Improved type consistency for neighbor statistics calculations by
ensuring the `rcut` and `rcut_smth` parameters are always floats.
- Enhanced handling of input parameters in various descriptor classes
for better robustness.
- **Bug Fixes**
- Enhanced performance and reliability of neighbor statistics operations
through constructor updates.
- **Documentation**
- Updated method signatures for clarity and consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Bug summary
When
rcut
is an int, an error throws:Expected a value of type 'float' for argument 'rcut' but instead found type 'int'.
DeePMD-kit Version
b86165d
Backend and its version
PyTorch 2.1.2.post300
How did you download the software?
Built from source
Input Files, Running Commands, Error Log, etc.
Steps to Reproduce
cd examples/water/se_e2_a
In
input.json
, change"rcut": 6.00
to"rcut": 6
.Further Information, Files, and Links
No response
The text was updated successfully, but these errors were encountered: