lm_polygraph.utils.normalize module

lm_polygraph.utils.normalize.filter_nans(gen_metrics: ndarray, ues: ndarray) Tuple[ndarray, ndarray][source]

Filters out NaNs from gen_metrics and ues if they occur at least in one of the arrays.

Args: gen_metrics: Array of gen_metrics ues: Array of ues

Returns: Tuple of two arrays: - First array contains gen_metrics with NaNs removed - Second array contains ues with NaNs removed

lm_polygraph.utils.normalize.get_mans_ues_metrics(man_paths: List[str], ue_method_names: List[str], gen_metric_names: List[str]) Tuple[Dict[str, ndarray], Dict[str, ndarray]][source]

Extracts and concats data from a list of paths to saved manager data files.

Args: man_paths: List of paths to manager data files ue_method_names: List of UE methods to extract gen_metric_names: List of gen_metrics to extract

Returns: Tuple of two dictionaries: - First dictionary contains UE method data, where keys are method names

and values are concatenated arrays of UE method data from all managers

  • Second dictionary contains gen_metric data, where keys are metric names and values are concatenated arrays of gen_metric data from all managers