diff --git a/scarab_stats/scarab_stats.py b/scarab_stats/scarab_stats.py index a4af6331..e8656ce8 100644 --- a/scarab_stats/scarab_stats.py +++ b/scarab_stats/scarab_stats.py @@ -105,6 +105,19 @@ def retrieve_stats(self, config: List[str], stats: List[str], workload: List[str available_workloads = set(self.data[self.data["stats"] == "Workload"].iloc[0][3:]) available_configs = set(self.data[self.data["stats"] == "Configuration"].iloc[0][3:]) + # Check if stats exist, and if not, check for _count variants + validated_stats = [] + available_stats = set(self.data["stats"].values) + for stat in stats: + if stat in available_stats: + validated_stats.append(stat) + elif f"{stat}_count" in available_stats: + validated_stats.append(f"{stat}_count") + else: + print(f"WARNING: Stat '{stat}' not found in dataframe, and '{stat}_count' not found either. Skipping.") + + stats = validated_stats + # Validate workloads missing_workloads = set(workload) - available_workloads diff --git a/sci b/sci index 622c0ed5..13248b9c 100755 --- a/sci +++ b/sci @@ -2830,7 +2830,8 @@ def run_visualize(descriptor_name: str) -> int: missing_stats: Set[str] = set() if available_stats: missing_stats = {stat for stat in resolved_stats if stat not in available_stats} - if missing_stats: + + if missing_stats and any({stat+ "_count" not in available_stats for stat in resolved_stats}): print( f"Skipping {stats_list}: not present in collected stats " f"({', '.join(sorted(missing_stats))})."