From 567c55685ea93b6375dd3568710dcf1c72e85f12 Mon Sep 17 00:00:00 2001 From: ViperEkura <3081035982@qq.com> Date: Fri, 28 Nov 2025 20:27:57 +0800 Subject: [PATCH] =?UTF-8?q?docs(data/dataset):=20=E6=9B=B4=E6=96=B0=20load?= =?UTF-8?q?=5Fmmap=5Ffiles=20=E5=87=BD=E6=95=B0=E7=9A=84=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- khaosz/data/dataset.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/khaosz/data/dataset.py b/khaosz/data/dataset.py index 8bb1b28..ba540a4 100644 --- a/khaosz/data/dataset.py +++ b/khaosz/data/dataset.py @@ -19,6 +19,20 @@ def load_mmap_files(root_path: str, shared: bool=True) -> Tuple[MultiSeg, int]: corresponding binary files as memory-mapped tensors. Returns tensors grouped by key and total number of elements. + json metadata like this: + + ``` + [ + { + "file_name": "file1.bin", + "size": 1000, + "dtype": "float32", + "key": "key1" + }, + ... + ] + ``` + Args: root_path: Root directory path containing file_mapper.json and binary files shared: Whether to load tensors in shared mode. If True, tensors can be