def failed(self, text): if self.jobtype == dt.TRAIN.value: post_job_status(self.jid, ds.TRAINNING_ERR.value, self.percent) elif self.jobtype == dt.PREDICT.value: post_job_status(self.jid, ds.PREDICTING_ERR.value, self.percent) print(text) return
def processing(self, percent): self.percent = percent if self.jobtype == dt.TRAIN.value: post_job_status(self.jid, ds.TRAINNING.value, self.percent) elif self.jobtype == dt.PREDICT.value: post_job_status(self.jid, ds.PREDICTING.value, self.percent) return
def done(self, text): self.percent = 100 if self.jobtype == dt.TRAIN.value: post_job_status(self.jid, ds.TRAINNING_DONE.value, self.percent) elif self.jobtype == dt.PREDICT.value: post_job_status(self.jid, ds.PREDICTING_DONE.value, self.percent) print(text) return
def failed(self, text): post_job_status(self.jid, ds.PROCESSING_ERR.value, self.percent) print(text) return
def processing(self, percent): self.percent = percent post_job_status(self.jid, ds.PROCESSING.value, self.percent) return
def done(self, text): self.percent = 100 post_job_status(self.jid, ds.PROCESSING_DONE.value, self.percent) print(text) return