flpelerin commited on
Commit
2db86a9
·
1 Parent(s): 4a61522

Update file logger.py

Browse files
Files changed (1) hide show
  1. logger.py +5 -6
logger.py CHANGED
@@ -1,4 +1,4 @@
1
- import wandb
2
  import os
3
 
4
  from util import Config, RandomCode
@@ -10,8 +10,7 @@ class Wandb:
10
  self.__dict__ = dict(config.__dict__)
11
 
12
  #print(f"self.wandb: {self.wandb}")
13
-
14
- print(f"self.config: {self.config}")
15
 
16
  if self.entity == '' or self.project == '' or self.api_key == '':
17
  raise ValueError('Missing required values for either Entity, Project or API Key')
@@ -24,11 +23,11 @@ class Wandb:
24
 
25
 
26
  def init(self):
27
- wandb.init(self.project, self.entity, self.name)
28
 
29
  def __call__(self, args):
30
- wandb.log(args)
31
 
32
 
33
  def __del__(self):
34
- wandb.finish()
 
1
+ import wandb as wb
2
  import os
3
 
4
  from util import Config, RandomCode
 
10
  self.__dict__ = dict(config.__dict__)
11
 
12
  #print(f"self.wandb: {self.wandb}")
13
+ #print(f"self.config: {self.config}")
 
14
 
15
  if self.entity == '' or self.project == '' or self.api_key == '':
16
  raise ValueError('Missing required values for either Entity, Project or API Key')
 
23
 
24
 
25
  def init(self):
26
+ wb.init(self.project, self.entity, self.name)
27
 
28
  def __call__(self, args):
29
+ wb.log(args)
30
 
31
 
32
  def __del__(self):
33
+ wb.finish()