Method
_save_file
(
tensors: Dict[str, np.ndarray],
path: Path,
metadata: Dict[str, str],
)
Source from the content-addressed store, hash-verified
| 12397 | |
| 12398 | @staticmethod |
| 12399 | def _save_file( |
| 12400 | tensors: Dict[str, np.ndarray], |
| 12401 | path: Path, |
| 12402 | metadata: Dict[str, str], |
| 12403 | ) -> None: |
| 12404 | from safetensors.numpy import save_file |
| 12405 | |
| 12406 | save_file(tensors, str(path), metadata=metadata) |
| 12407 | |
| 12408 | def _metadata_compatible(self, metadata: Optional[Dict[str, str]]) -> bool: |
| 12409 | if metadata is None: |
Tested by
no test coverage detected