From 6de00bb28d96d26c337ba87773b44102c2595d38 Mon Sep 17 00:00:00 2001 From: saeliddp Date: Thu, 8 Aug 2024 16:14:18 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20main=20@=20c?= =?UTF-8?q?ee8402975ce977790e037cc9110371ee77e8269=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _modules/cyto_dl/utils/template_utils.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/_modules/cyto_dl/utils/template_utils.html b/_modules/cyto_dl/utils/template_utils.html index 7e37d2aa..e4bfecbc 100644 --- a/_modules/cyto_dl/utils/template_utils.html +++ b/_modules/cyto_dl/utils/template_utils.html @@ -610,8 +610,12 @@

Source code for cyto_dl.utils.template_utils

hparams["ckpt_path"] = cfg.get("ckpt_path")
     hparams["seed"] = cfg.get("seed")
 
-    reqs = subprocess.check_output([sys.executable, "-m", "pip", "freeze"])  # nosec: B603
-    hparams["requirements"] = str(reqs).split("\\n")
+    try:
+        reqs = subprocess.check_output([sys.executable, "-m", "pip", "freeze"])  # nosec: B603
+        hparams["requirements"] = str(reqs).split("\\n")
+    except subprocess.CalledProcessError:
+        # not mandatory to save requirements; allows segmenter plugin devs to use PDM
+        pass
 
     # send hparams to all loggers
     for logger in trainer.loggers: