From 9c9f4a93cfc23fa6879c940a210e078088408e6b Mon Sep 17 00:00:00 2001 From: huxianglong Date: Tue, 17 Dec 2024 10:43:44 +0800 Subject: [PATCH] fix envirment variable analyzer logger --- .../analyzer/overall/environment_variable_analyzer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/profiler/advisor/analyzer/overall/environment_variable_analyzer.py b/profiler/advisor/analyzer/overall/environment_variable_analyzer.py index 837d4554c0..6cfffc2fe5 100644 --- a/profiler/advisor/analyzer/overall/environment_variable_analyzer.py +++ b/profiler/advisor/analyzer/overall/environment_variable_analyzer.py @@ -20,6 +20,8 @@ from profiler.advisor.dataset.environment_variable_dataset import EnvironmentVar from profiler.advisor.analyzer.overall.environment_variable_checker import EnvironmentVariabelChecker from profiler.advisor.display.html.priority_background_color import PriorityBackgroundColor +logger = logging.getLogger() + class EnvironmentVariabelAnalyzer(BaseAnalyzer): dataset_cls_list = [EnvironmentVariableDataset] @@ -30,6 +32,9 @@ class EnvironmentVariabelAnalyzer(BaseAnalyzer): @BaseAnalyzer.check_data((EnvironmentVariableDataset.get_key(),)) def optimize(self, **kwargs): + if "mindspore" in self.profiling_type: + logger.warning("The analyzer %s does not support MindSpore.", self.__class__.__name__) + return self.result try: PathManager.check_input_directory_path(self.collection_path) except RuntimeError as e: -- Gitee