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

Method _find_source_motion_path

mbench/__init__.py:104–118  ·  view source on GitHub ↗

Locate the raw motion file for a given category/id.

(self, evaluation_path: str, category: str, motion_id: int)

Source from the content-addressed store, hash-verified

102 return candidates
103
104 def _find_source_motion_path(self, evaluation_path: str, category: str, motion_id: int) -> Optional[Path]:
105 """Locate the raw motion file for a given category/id."""
106 evaluation_path = Path(evaluation_path)
107 category_dir = self.category_dir_map.get(category)
108 if category_dir:
109 base_dir = evaluation_path / category_dir / str(motion_id)
110 for filename in ["motion.pt", "motion.npy"]:
111 candidate = base_dir / filename
112 if candidate.exists():
113 return candidate
114
115 for candidate in self._motion_candidates(evaluation_path, motion_id):
116 if candidate.exists():
117 return candidate
118 return None
119
120 def _find_source_video_path(self, evaluation_path: str, category: str, motion_id: int) -> Optional[Path]:
121 """Locate an already rendered video for a given category/id."""

Callers 1

Calls 1

_motion_candidatesMethod · 0.95

Tested by

no test coverage detected