Code: Select all
with h5py.File(computed_properties_path, "r") as f:
# get the set of computed metrics
computed_metrics = set()
# iterating through the file iterates through the keys which are dataset names
f = cast(Iterable[str], f)
dataset_name: str
for dataset_name in f:
# re-cast it as a file
f = cast(h5py.File, f)
dataset_group = index_hdf5(f, [dataset_name], h5py.Group)
for metric_name in dataset_group:
logger.info(f"Dataset: {dataset_name}, Metric: {metric_name}")