From e5bab039f77b048307ed6c475c0b5d86cb5bd197 Mon Sep 17 00:00:00 2001 From: p-ferreira <38992619+p-ferreira@users.noreply.github.com> Date: Wed, 23 Aug 2023 09:48:44 -0400 Subject: [PATCH 1/2] update wandb config --- openvalidators/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openvalidators/utils.py b/openvalidators/utils.py index e9e6c92..23827b2 100644 --- a/openvalidators/utils.py +++ b/openvalidators/utils.py @@ -49,12 +49,15 @@ def init_wandb(self, reinit=False): if self.config.neuron.disable_log_rewards: tags.append("disable_log_rewards") + wandb_config = {key: self.config.get(key, None) for key in ('neuron', 'reward', 'netuid', 'wandb')} + wandb_config['neuron'].pop('full_path', None) + self.wandb = wandb.init( anonymous="allow", reinit=reinit, project=self.config.wandb.project_name, entity=self.config.wandb.entity, - config={key: self.config.get(key, None) for key in ('neuron', 'reward')}, + config=wandb_config, mode="offline" if self.config.wandb.offline else "online", dir=self.config.neuron.full_path, tags=tags, From baf3f6333f607ca239f74bf095df24df62a1dbff Mon Sep 17 00:00:00 2001 From: p-ferreira <38992619+p-ferreira@users.noreply.github.com> Date: Wed, 23 Aug 2023 10:03:28 -0400 Subject: [PATCH 2/2] adds deep copy --- openvalidators/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvalidators/utils.py b/openvalidators/utils.py index 23827b2..c9d12f8 100644 --- a/openvalidators/utils.py +++ b/openvalidators/utils.py @@ -49,7 +49,7 @@ def init_wandb(self, reinit=False): if self.config.neuron.disable_log_rewards: tags.append("disable_log_rewards") - wandb_config = {key: self.config.get(key, None) for key in ('neuron', 'reward', 'netuid', 'wandb')} + wandb_config = {key: copy.deepcopy(self.config.get(key, None)) for key in ('neuron', 'reward', 'netuid', 'wandb')} wandb_config['neuron'].pop('full_path', None) self.wandb = wandb.init(