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
When computing the data stat, if two descriptors have the same hash (see get_hash below, e.g. repformer and repinit_tebd), the latter one will choose to load the computed stats.
def get_hash(self) -> str:
"""Get the hash of the environment matrix.
Returns
-------
str
The hash of the environment matrix.
"""
dscpt_type = "se_a" if self.last_dim == 4 else "se_r"
return get_hash(
{
"type": dscpt_type,
"ntypes": self.descriptor.get_ntypes(),
"rcut": round(self.descriptor.get_rcut(), 2),
"rcut_smth": round(self.descriptor.rcut_smth, 2),
"nsel": self.descriptor.get_nsel(),
"sel": self.descriptor.get_sel(),
"mixed_types": self.descriptor.mixed_types(),
}
)
However, it seems that the computed stats are not flushed to the file (even used self.root.flush() in DPH5Path), so an empty stats will be loaded and raise error.
Fix#4151.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced path filtering logic to include a broader range of keys when
generating subpaths.
- **Bug Fixes**
- Improved the accuracy of path results returned by the `glob` method.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Bug summary
When computing the data stat, if two descriptors have the same hash (see
get_hash
below, e.g. repformer and repinit_tebd), the latter one will choose to load the computed stats.However, it seems that the computed stats are not flushed to the file (even used
self.root.flush()
inDPH5Path
), so an empty stats will be loaded and raise error.After computation, next training process will success in loading stats from hdf5 file.
DeePMD-kit Version
devel
Backend and its version
PyTorch v2.1.2
How did you download the software?
Built from source
Input Files, Running Commands, Error Log, etc.
cd examples/water/dpa2
dp --pt train input_torch_small.json
Steps to Reproduce
see above
Further Information, Files, and Links
No response
The text was updated successfully, but these errors were encountered: