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
Propose a plain text model format based on YAML, which humans can easily
read and might be easier to track changes in the git repository (which
is good for #2103).
Example:
[deeppot_dpa_sel.yaml](https://github.com/user-attachments/files/16384230/deeppot_dpa_sel.yaml.txt)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added support for additional file formats (.yaml and .yml) for model
saving and loading.
- Enhanced the ability to serialize and deserialize model data in
multiple formats.
- **Bug Fixes**
- Improved error handling for unsupported file formats during model
loading.
- **Documentation**
- Updated documentation to reflect new supported file formats and
clarify backend capabilities.
- **Tests**
- Introduced new test cases to ensure functionality for saving and
loading models in YAML format.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Jinzhe Zeng <[email protected]>
Copy file name to clipboardExpand all lines: doc/backend.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,15 @@ While `.pth` and `.pt` are the same in the PyTorch package, they have different
29
29
This backend is only for development and should not take into production.
30
30
:::
31
31
32
-
- Model filename extension: `.dp`
32
+
- Model filename extension: `.dp`, `.yaml`, `.yml`
33
33
34
34
DP is a reference backend for development, which uses pure [NumPy](https://numpy.org/) to implement models without using any heavy deep-learning frameworks.
35
35
Due to the limitation of NumPy, it doesn't support gradient calculation and thus cannot be used for training.
36
36
As a reference backend, it is not aimed at the best performance, but only the correct results.
37
-
The DP backend uses [HDF5](https://docs.h5py.org/) to store model serialization data, which is backend-independent.
38
-
Only Python inference interface can load this format.
37
+
The DP backend has two formats, both of which are backend-independent:
38
+
The `.dp` format uses [HDF5](https://docs.h5py.org/) to store model serialization data, which has good performance.
39
+
The `.yaml` or `.yml` use [YAML](https://yaml.org/) to save the data as plain texts, which is easy to read for human beings.
40
+
Only Python inference interface can load these formats.
0 commit comments