Download src/storage/metadata.py from pratik-250620/MultiModal-Coherence-AI: direct link, hf CLI and curl.
- Browser
- Download file 390 Bytes
-
https://huggingface.co/spaces/pratik-250620/MultiModal-Coherence-AI/resolve/main/src/storage/metadata.py
- Command line
-
hf download hf://spaces/pratik-250620/MultiModal-Coherence-AI/src/storage/metadata.py
-
curl -L -o metadata.py https://huggingface.co/spaces/pratik-250620/MultiModal-Coherence-AI/resolve/main/src/storage/metadata.py
390 Bytes
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| from typing import Any, Dict | |
| def write_run_metadata(log_path: str | Path, payload: Dict[str, Any]) -> None: | |
| log_path = Path(log_path) | |
| log_path.parent.mkdir(parents=True, exist_ok=True) | |
| with log_path.open("w", encoding="utf-8") as handle: | |
| json.dump(payload, handle, ensure_ascii=False, indent=2) | |