Download scripts/infer/check_run_visual_data.py from Tinghong-Ye22/code-HFD: direct link, hf CLI and curl.
- Browser
- Download file 841 Bytes
-
https://huggingface.co/Tinghong-Ye22/code-HFD/resolve/main/scripts/infer/check_run_visual_data.py
- Command line
-
hf download hf://Tinghong-Ye22/code-HFD/scripts/infer/check_run_visual_data.py
-
curl -L -o check_run_visual_data.py https://huggingface.co/Tinghong-Ye22/code-HFD/resolve/main/scripts/infer/check_run_visual_data.py
841 Bytes
| """Validate the saved overlay recipe without consulting legacy SWA caches.""" | |
| import json | |
| import os | |
| from pathlib import Path | |
| import sys | |
| ROOT = Path(__file__).resolve().parents[2] | |
| sys.path[:0] = [str(ROOT), str(ROOT / "src")] | |
| def check_run(run): | |
| from scripts.data.check_hfd_overlay_manifest import check | |
| config = json.loads((Path(run) / "run_config.json").read_text()) | |
| data = config["data"] | |
| return check( | |
| data["multimodal_overlay_manifests"], | |
| config["model"]["model_name_or_path"], | |
| require_eight_voices=True, | |
| require_live_video_qa=True, | |
| visual_input_mode=os.environ.get( | |
| "HFD_VISUAL_INPUT_MODE", data.get("multimodal_visual_input_mode", "cached") | |
| ), | |
| ) | |
| if __name__ == "__main__": | |
| print(json.dumps(check_run(sys.argv[1]), ensure_ascii=False), flush=True) | |