From 1779da47572bc6a0de8f43bb4608516a4a3f8ae9 Mon Sep 17 00:00:00 2001 From: araison Date: Tue, 31 Jan 2023 08:20:53 +0100 Subject: [PATCH] Fixing logging folder --- explaining_framework/utils/explaining/outline.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/explaining_framework/utils/explaining/outline.py b/explaining_framework/utils/explaining/outline.py index eef12ab..590f4c4 100644 --- a/explaining_framework/utils/explaining/outline.py +++ b/explaining_framework/utils/explaining/outline.py @@ -105,8 +105,8 @@ all_robust = [ "add_edge", "remove_edge", "remove_node", - "pgd", - "fgsm", + # "pgd", + # "fgsm", "no_attack", ] all_sparsity = ["l0"] @@ -716,7 +716,6 @@ class ExplainingOutline(object): makedirs(self.out_dir) now_str = now.strftime("month=%m-day=%d-year=%Y-hour=%H-minute=%M-second=%S") - set_printing(f"{self.out_dir}/logging-{now_str}.log") dump_cfg(self.cfg, os.path.join(self.out_dir, "config.yaml")) write_json(self.model_info, os.path.join(self.out_dir, "info.json")) @@ -736,6 +735,8 @@ class ExplainingOutline(object): os.path.join(self.explainer_path, self.explaining_cfg.cfg_dest), ) + makedirs(os.path.join(self.explainer_path, "logs")) + set_printing(f"{self.explainer_path}/logs/{now_str}.log") logging.info("Setting up experiment") logging.info("Date and Time: %s", now) logging.info("Save experiment to %s", self.out_dir)