mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
addedthe build of the reference map to the dataset
This commit is contained in:
@ -189,6 +189,14 @@ class Dataset:
|
||||
|
||||
return Dataset(entries=entries)
|
||||
|
||||
def build_reference_map(self) -> Dict[str, DatasetEntry]:
|
||||
"""Build a reference map for the dataset"""
|
||||
|
||||
ref_map = {}
|
||||
for entry in self.entries:
|
||||
ref_map[entry.metadata.id] = entry
|
||||
return ref_map
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from utils import prompt_yes_no
|
||||
|
Reference in New Issue
Block a user