From 4e5f10378a55b26c8e6f9af82a56c4d86453d87b Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 9 Jul 2023 17:41:41 +0200 Subject: [PATCH] fix: put wandb into seperate thread --- slate/slate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/slate/slate.py b/slate/slate.py index 02d7190..cd33348 100644 --- a/slate/slate.py +++ b/slate/slate.py @@ -215,7 +215,8 @@ class Slate(): project = self.consume(copy.deepcopy(config['wandb']), 'project') sweep_id = wandb.sweep( sweep=sweepC, - project=project + project=project, + settings=wandb.Settings(start_method="thread") ) wandb.agent(sweep_id, function=partial(self._run_from_sweep, config, p_ind=p_ind), count=len(rep_ids)) else: @@ -234,6 +235,7 @@ class Slate(): with wandb.init( project=project, config=copy.deepcopy(config), + settings=wandb.Settings(start_method="thread"), **wandbC ) as run: runner(self, run, config) @@ -254,6 +256,7 @@ class Slate(): with wandb.init( project=project, + settings=wandb.Settings(start_method="thread"), **wandbC ) as run: config = copy.deepcopy(orig_config)