Function
update_entry_paths
(entry: Dict[str, Any], repo_root: Path, pt_path: Path, mp4_path: Path)
Source from the content-addressed store, hash-verified
| 113 | |
| 114 | |
| 115 | def update_entry_paths(entry: Dict[str, Any], repo_root: Path, pt_path: Path, mp4_path: Path) -> Dict[str, Any]: |
| 116 | new_entry = dict(entry) |
| 117 | try: |
| 118 | new_entry["video_path"] = str(mp4_path.relative_to(repo_root)) |
| 119 | except ValueError: |
| 120 | new_entry["video_path"] = str(mp4_path) |
| 121 | try: |
| 122 | new_entry["mbench_eval_path"] = str(pt_path.relative_to(repo_root)) |
| 123 | except ValueError: |
| 124 | new_entry["mbench_eval_path"] = str(pt_path) |
| 125 | return new_entry |
| 126 | |
| 127 | |
| 128 | def main() -> None: |
Tested by
no test coverage detected