diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py index f558aec48e1abdfd164b9e703a01622fac46b7a7..0a54ae5687cb4944c7b2701c0c94d65c5fe16c31 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py @@ -12,7 +12,7 @@ WORKER_PATTERN = re.compile(r"""^(.*?) # worker name (?:\.gz)?$""", re.X) # optional .gz extension TRACE_PATTERN = re.compile(r"""^trace_view\.json(\.gz)?$""") -WORKER_SPAN_PATTERN = re.compile(r"""([^\\]*_\d+)_(\d+)$""") +WORKER_SPAN_PATTERN = re.compile(r"""([^\\]*)_(\d+)$""") NODE_PROCESS_PATTERN = re.compile(r"""^(.*)_(\d+)""") MONITOR_RUN_REFRESH_INTERNAL_IN_SECONDS = 10 diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py index fd553c741159d3a80cc1934b20a9606a2a27b5c4..01864509c2a4f744e808e33477cb68aec80b3792 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py @@ -101,7 +101,7 @@ class RunProfileData(object): self.recommendations = [] @staticmethod - def parse(run_name, worker, span_name, span, path, cache_dir): + def parse(worker, span, path, cache_dir): trace_json = {} trace_path = path has_trace = False diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py index 8d8e93171b690ea5ab332cbdbe0ced976462cea8..ac1501aa535ea21860b0ff43a33dc932ad1d8adf 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py @@ -82,7 +82,7 @@ class RunLoader(object): try: logger.debug('Parse trace, run_dir=%s, data_dir=%s', self.run_dir, path) local_file = self.caches.get_remote_cache(io.join(self.run_dir, path)) - data = RunProfileData.parse(self.run_name, worker, span_name, span, local_file, self.caches.cache_dir) + data = RunProfileData.parse(worker, span, local_file, self.caches.cache_dir) if data.trace_file_path != local_file: self.caches.add_file(local_file, data.trace_file_path)