diff --git a/perun/configuration.py b/perun/configuration.py index 830d340..f9dd44e 100644 --- a/perun/configuration.py +++ b/perun/configuration.py @@ -27,8 +27,8 @@ "benchmarking": { "rounds": 1, "warmup_rounds": 0, - "units": {"JOULE": "k", "SECOND": "", "PERCENT": "", "POWER": ""}, }, + "benchmarking.units": {"joule": "k", "second": "", "percent": "", "power": ""}, "debug": {"log_lvl": "WARNING"}, # "horeka": {"enabled": False, "url": "", "token": "", "org": ""}, } diff --git a/perun/io/bench.py b/perun/io/bench.py index 8e6f07f..806f07a 100644 --- a/perun/io/bench.py +++ b/perun/io/bench.py @@ -33,10 +33,10 @@ def exportBench(dataNode: DataNode, mr_id: str) -> str: mrNode = dataNode.nodes[mr_id] bench_units: Dict[str, Magnitude] = { - "JOULE": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.JOULE"]), - "SECOND": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.SECOND"]), - "WATT": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.WATT"]), - "PERCENT": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.PERCENT"]), + "JOULE": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.joule"]), + "SECOND": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.second"]), + "WATT": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.power"]), + "PERCENT": Magnitude.fromSymbol(mrNode.metadata["benchmarking.units.percent"]), } for metricType, metric in mrNode.metrics.items(): diff --git a/perun/perun.py b/perun/perun.py index 207d684..f58bf64 100644 --- a/perun/perun.py +++ b/perun/perun.py @@ -90,21 +90,21 @@ def backends(self) -> Dict[str, Backend]: """ if not self._backends: self._backends = {} - classList: List[Type[Backend]] = [ - IntelRAPLBackend, - NVMLBackend, - PSUTILBackend, - ] - for backend in classList: + classList: Dict[str, Type[Backend]] = { + "IntelRAPL": IntelRAPLBackend, + "NVML": NVMLBackend, + "PSUTIL": PSUTILBackend, + } + for name, backend in classList.items(): try: backend_instance = backend() self._backends[backend_instance.id] = backend_instance except ImportError as ie: - log.info(f"Missing dependencies for backend {backend.name}") + log.info(f"Missing dependencies for backend {name}") log.info(ie) except Exception as e: - log.warning(f"Unknown error loading dependecy {backend.name}") - log.warning(e) + log.info(f"Unknown error loading dependecy {name}") + log.info(e) return self._backends