fix: put wandb into seperate thread

This commit is contained in:
Dominik Moritz Roth 2023-07-09 17:41:41 +02:00
parent 7dbb3b32be
commit 4e5f10378a

View File

@ -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)