bug fix: generator iherited by shuffle

This commit is contained in:
Steve Nyemba 2022-04-14 12:03:59 -05:00
parent 528e6db0b8
commit 9f198f3b15
1 changed files with 6 additions and 3 deletions

View File

@ -168,9 +168,12 @@ class Generator (Learner):
self.network_args['candidates'] = int(_args['candidates']) if 'candidates' in _args else 1
filename = os.sep.join([self.network_args['logs'],'output',self.network_args['context'],'map.json'])
self.log(**{'action':'init-map','input':{'filename':filename,'exists':os.path.exists(filename)}})
file = open(filename)
self._map = json.loads(file.read())
file.close()
if os.path.exists(filename):
file = open(filename)
self._map = json.loads(file.read())
file.close()
else:
self._map = {}
def run(self):
self.initalize()
if self._encoder is None :