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

Method _sort_key

mbench/__init__.py:412–418  ·  view source on GitHub ↗
(rec: Dict[str, Any])

Source from the content-addressed store, hash-verified

410 if per_motion_registry:
411 per_motion_output = os.path.join(self.output_path, f'{name}_per_motion_results.json')
412 def _sort_key(rec: Dict[str, Any]):
413 rec_id = rec.get("id")
414 if isinstance(rec_id, (int, float)):
415 return (False, float(rec_id))
416 if rec_id is None:
417 return (True, float("inf"))
418 return (False, str(rec_id))
419
420 sorted_records = sorted(per_motion_registry.values(), key=_sort_key)
421 per_motion_payload = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected