"""Load the reviewed dataset mappings from an extracted UniBuild HF release.""" import json from pathlib import Path def load_dataset_configs(release_root): root = Path(release_root).resolve() configs = json.loads((root / 'dataset_configs.json').read_text()) for config in configs.values(): config['class_dict'] = {int(key): tuple(value) for key, value in config['class_dict'].items()} for key in ['data_dir', 'split_dir']: config[key] = str(root / config[key]) config['use_lmdb'] = False return configs