From d40026ff90c288a8e0c5a7372ef38324aa9d9bd0 Mon Sep 17 00:00:00 2001 From: Ayush Chaurasia Date: Sun, 1 Aug 2021 15:36:53 +0530 Subject: [PATCH] W&B: suppress warnings (#4257) * Improve docstrings and run names * default wandb login prompt with timeout * return key * Update api_key check logic * Properly support zipped dataset feature * update docstring * Revert tuorial change * extend changes to log_dataset * add run name * bug fix * bug fix * Update comment * fix import check * remove unused import * Hardcore .yaml file extension * reduce code * Reformat using pycharm * Remove redundant try catch * More refactoring and bug fixes * retry * Reformat using pycharm * respect LOGGERS include list * call wandblogger.log instead of wandb.log Co-authored-by: Glenn Jocher --- utils/loggers/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/loggers/__init__.py b/utils/loggers/__init__.py index 5d4377d54155..be76d0c17f1b 100644 --- a/utils/loggers/__init__.py +++ b/utils/loggers/__init__.py @@ -134,7 +134,8 @@ def on_train_end(self, last, best, plots, epoch): self.tb.add_image(f.stem, np.asarray(Image.open(f)), epoch, dataformats='HWC') if self.wandb: - wandb.log({"Results": [wandb.Image(str(f), caption=f.name) for f in files]}) + self.wandb.log({"Results": [wandb.Image(str(f), caption=f.name) for f in files]}) + # Calling wandb.log. TODO: Refactor this into WandbLogger.log_model wandb.log_artifact(str(best if best.exists() else last), type='model', name='run_' + self.wandb.wandb_run.id + '_model', aliases=['latest', 'best', 'stripped'])