in data_measurements/dataset_statistics.py [0:0]
def load_or_prepare_labels(self, load_only=False):
"""Uses a generic Labels class, with attributes specific to this
project as input.
Computes results for each label column,
or else uses what's available in the cache.
Currently supports Datasets with just one label column.
"""
label_obj = labels.DMTHelper(self, load_only=load_only, save=self.save)
self.label_files = label_obj.get_label_filenames()
if self.use_cache and exists(self.label_files["figure json"]) and exists(self.label_files["statistics"]):
self.fig_labels = ds_utils.read_plotly(self.label_files["figure json"])
self.label_results = ds_utils.read_json(self.label_files["statistics"])
elif not load_only:
label_obj.run_DMT_processing()
self.fig_labels = label_obj.fig_labels
self.label_results = label_obj.label_results