MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / _extract

Function _extract

internbootcamp/utils/data_postprocess.py:779–785  ·  view source on GitHub ↗
(data: Dict[str, Any])

Source from the content-addressed store, hash-verified

777 return value
778
779 def _extract(data: Dict[str, Any]) -> Dict[str, Any]:
780 result = {}
781 for path in field_paths:
782 # 使用路径的最后一部分作为键名
783 key = path.split('.')[-1]
784 result[key] = _get_nested_value(data, path)
785 return result
786
787 return _extract
788

Callers

nothing calls this directly

Calls 2

_get_nested_valueFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected