Saves the training log, timestamp will be added automatically. Parameters ----------- kwargs : logging information Events, such as accuracy, loss, step number and etc. Examples --------- >>> db.save_training_log(accuracy=0.33, loss=0.98)
(self, **kwargs)
| 412 | |
| 413 | # =========================== LOGGING =============================== |
| 414 | def save_training_log(self, **kwargs): |
| 415 | """Saves the training log, timestamp will be added automatically. |
| 416 | |
| 417 | Parameters |
| 418 | ----------- |
| 419 | kwargs : logging information |
| 420 | Events, such as accuracy, loss, step number and etc. |
| 421 | |
| 422 | Examples |
| 423 | --------- |
| 424 | >>> db.save_training_log(accuracy=0.33, loss=0.98) |
| 425 | |
| 426 | """ |
| 427 | |
| 428 | self._fill_project_info(kwargs) |
| 429 | kwargs.update({'time': datetime.utcnow()}) |
| 430 | _result = self.db.TrainLog.insert_one(kwargs) |
| 431 | _log = self._print_dict(kwargs) |
| 432 | logging.info("[Database] train log: " + _log) |
| 433 | |
| 434 | def save_validation_log(self, **kwargs): |
| 435 | """Saves the validation log, timestamp will be added automatically. |
nothing calls this directly
no test coverage detected