bug fix: generator iherited by shuffle
This commit is contained in:
parent
528e6db0b8
commit
9f198f3b15
|
@ -168,9 +168,12 @@ class Generator (Learner):
|
||||||
self.network_args['candidates'] = int(_args['candidates']) if 'candidates' in _args else 1
|
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'])
|
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)}})
|
self.log(**{'action':'init-map','input':{'filename':filename,'exists':os.path.exists(filename)}})
|
||||||
file = open(filename)
|
if os.path.exists(filename):
|
||||||
self._map = json.loads(file.read())
|
file = open(filename)
|
||||||
file.close()
|
self._map = json.loads(file.read())
|
||||||
|
file.close()
|
||||||
|
else:
|
||||||
|
self._map = {}
|
||||||
def run(self):
|
def run(self):
|
||||||
self.initalize()
|
self.initalize()
|
||||||
if self._encoder is None :
|
if self._encoder is None :
|
||||||
|
|
Loading…
Reference in New Issue