(path: Path)
| 12386 | |
| 12387 | @staticmethod |
| 12388 | def _safe_open(path: Path) -> Any: |
| 12389 | try: |
| 12390 | from safetensors import safe_open |
| 12391 | except ImportError as exc: |
| 12392 | raise ImportError( |
| 12393 | "disk_cache requires safetensors. Install it with `pip install safetensors`." |
| 12394 | ) from exc |
| 12395 | |
| 12396 | return safe_open(str(path), framework="numpy") |
| 12397 | |
| 12398 | @staticmethod |
| 12399 | def _save_file( |
no outgoing calls
no test coverage detected