MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / update_entry_paths

Function update_entry_paths

motion_gating/render_mbench_videos.py:115–125  ·  view source on GitHub ↗
(entry: Dict[str, Any], repo_root: Path, pt_path: Path, mp4_path: Path)

Source from the content-addressed store, hash-verified

113
114
115def 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
128def main() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected