From daf627a6de567c37d4a32e695c808aa706e161d4 Mon Sep 17 00:00:00 2001 From: ViperEkura <3081035982@qq.com> Date: Fri, 12 Jun 2026 15:39:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=5Fsave=5Flog=20=E5=89=8D=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E6=97=A5=E5=BF=97=E7=9B=AE=E5=BD=95=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E8=B7=A8=E8=BF=9B=E7=A8=8B=E5=8F=8D?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E5=90=8E=E7=9B=AE=E5=BD=95=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrai/trainer/train_callback.py | 1 + 1 file changed, 1 insertion(+) diff --git a/astrai/trainer/train_callback.py b/astrai/trainer/train_callback.py index 225e4d9..b28a275 100644 --- a/astrai/trainer/train_callback.py +++ b/astrai/trainer/train_callback.py @@ -271,6 +271,7 @@ class MetricLoggerCallback(TrainCallback): @only_on_rank(0) def _save_log(self, epoch, iter): log_file = self.log_dir / f"epoch_{epoch}_iter_{iter}_metric.jsonl" + log_file.parent.mkdir(parents=True, exist_ok=True) with open(log_file, "w") as f: for log in self.log_cache: