bug fix: preconditions
This commit is contained in:
parent
bbbeb5172a
commit
9b3031af1c
|
@ -248,7 +248,7 @@ class Learner(Process):
|
||||||
_args = {"schema":self.get_schema(),"data":self._df,"columns":columns}
|
_args = {"schema":self.get_schema(),"data":self._df,"columns":columns}
|
||||||
if self._map :
|
if self._map :
|
||||||
_args['map'] = self._map
|
_args['map'] = self._map
|
||||||
self._encoder = prepare.Input(**_args)
|
self._encoder = prepare.Input(**_args) if self._df.shape[0] > 0 else None
|
||||||
class Trainer(Learner):
|
class Trainer(Learner):
|
||||||
"""
|
"""
|
||||||
This will perform training using a GAN
|
This will perform training using a GAN
|
||||||
|
@ -263,6 +263,10 @@ class Trainer(Learner):
|
||||||
self.candidates = int(_args['candidates']) if 'candidates' in _args else 1
|
self.candidates = int(_args['candidates']) if 'candidates' in _args else 1
|
||||||
def run(self):
|
def run(self):
|
||||||
self.initalize()
|
self.initalize()
|
||||||
|
if self._encoder is None :
|
||||||
|
#
|
||||||
|
# @TODO Log that the dataset was empty or not statistically relevant
|
||||||
|
return
|
||||||
_space,_matrix = self._encoder.convert()
|
_space,_matrix = self._encoder.convert()
|
||||||
|
|
||||||
_args = self.network_args
|
_args = self.network_args
|
||||||
|
@ -311,9 +315,15 @@ class Generator (Learner):
|
||||||
file.close()
|
file.close()
|
||||||
def run(self):
|
def run(self):
|
||||||
self.initalize()
|
self.initalize()
|
||||||
|
if self._encoder is None :
|
||||||
|
#
|
||||||
|
# @TODO Log that the dataset was empty or not statistically relevant
|
||||||
|
return
|
||||||
|
|
||||||
#
|
#
|
||||||
# The values will be returned because we have provided _map information from the constructor
|
# The values will be returned because we have provided _map information from the constructor
|
||||||
#
|
#
|
||||||
|
|
||||||
values,_matrix = self._encoder.convert()
|
values,_matrix = self._encoder.convert()
|
||||||
_args = self.network_args
|
_args = self.network_args
|
||||||
_args['map'] = self._map
|
_args['map'] = self._map
|
||||||
|
|
Loading…
Reference in New Issue