def saveDebugStateAtBatch(self, name, batchID, LPchunk=None, SS=None,
SSchunk=None, hmodel=None,
Dchunk=None):
if self.outputParams['debugBatch'] == batchID:
debugLap = self.outputParams['debugLap']
debugLapBuffer = self.outputParams['debugLapBuffer']
if self.lapFrac < 1:
joblib.dump(dict(Dchunk=Dchunk),
os.path.join(self.task_output_path, 'Debug-Data.dump'))
belowWindow = self.lapFrac < debugLap - debugLapBuffer
aboveWindow = self.lapFrac > debugLap + debugLapBuffer
if belowWindow or aboveWindow:
return
filename = 'DebugLap%04.0f-%s.dump' % (np.ceil(self.lapFrac), name)
SaveVars = dict(LP=LPchunk, SS=SS, hmodel=hmodel,
SSchunk=SSchunk,
lapFrac=self.lapFrac)
joblib.dump(SaveVars, os.path.join(self.task_output_path, filename))
if self.lapFrac < 1:
joblib.dump(dict(Dchunk=Dchunk),
os.path.join(self.task_output_path, 'Debug-Data.dump'))
评论列表
文章目录