From 30c9b2e734a93e8ce8748a0b8177972243e55cdf Mon Sep 17 00:00:00 2001 From: lcw Date: Fri, 28 Jun 2024 11:22:25 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E7=BB=9F=E4=B8=80dump=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=92=8C=E6=A2=AF=E5=BA=A6=E5=B7=A5=E5=85=B7=E7=9A=84?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=9B=AE=E5=BD=95=EF=BC=8Crank=5F0=20->=20ra?= =?UTF-8?q?nk0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debug/accuracy_tools/grad_tool/grad_pt/grad_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debug/accuracy_tools/grad_tool/grad_pt/grad_monitor.py b/debug/accuracy_tools/grad_tool/grad_pt/grad_monitor.py index 19c5b32bf8b..59d0775a8fb 100644 --- a/debug/accuracy_tools/grad_tool/grad_pt/grad_monitor.py +++ b/debug/accuracy_tools/grad_tool/grad_pt/grad_monitor.py @@ -73,8 +73,8 @@ class PtGradientMonitor(BaseMonitor): bounds=self._bounds) output_lines.append(grad_info) self._level_adp.save_grad_direction(param_name, grad, - f'{self._output_path}/rank_{self._rank}/step_{self._step}') - output_path = os.path.join(self._output_path, f"rank_{getattr(self, '_rank')}", + f'{self._output_path}/rank{self._rank}/step{self._step}') + output_path = os.path.join(self._output_path, f"rank{getattr(self, '_rank')}", f"grad_summary_{self._step}.csv") write_csv(output_path, output_lines, GradStatCsv.generate_csv_header(level=self._level_adp, bounds=self._bounds)) -- Gitee