From ee2efa6da98b64b05720629d4e1accf90b99aed5 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 10 Jul 2023 11:26:46 +0200 Subject: [PATCH] wandb --- slate/slate.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/slate/slate.py b/slate/slate.py index 03b58c0..a4efee8 100644 --- a/slate/slate.py +++ b/slate/slate.py @@ -14,7 +14,7 @@ d = pdb.set_trace REQUIRE_CONFIG_CONSUMED = False WANDB_START_METHOD = 'fork' -REINIT = False +REINIT = True Parallelization_Primitive = Thread # Process @@ -90,9 +90,10 @@ class Slate(): def expand_vars(self, string, **kwargs): if isinstance(string, str): + rand = int(random.random()*99999999) if string == '{rand}': - return int(random.random()*99999999) - return string.format(**kwargs, rand=int(random.random()*99999999)) + return rand + return string.format(**kwargs, rand=rand) return string def apply_nested(self, d, f):