Skip to content

Commit 2825598

Browse files
authored
[Fix]: Fix to skip remote sync when wandb is offline (#8755)
1 parent 4f47302 commit 2825598

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

mmdet/core/hook/wandblogger_hook.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,12 @@ def _log_data_table(self):
566566
data_artifact = self.wandb.Artifact('val', type='dataset')
567567
data_artifact.add(self.data_table, 'val_data')
568568

569-
self.wandb.run.use_artifact(data_artifact)
570-
data_artifact.wait()
571-
572-
self.data_table_ref = data_artifact.get('val_data')
569+
if not self.wandb.run.offline:
570+
self.wandb.run.use_artifact(data_artifact)
571+
data_artifact.wait()
572+
self.data_table_ref = data_artifact.get('val_data')
573+
else:
574+
self.data_table_ref = self.data_table
573575

574576
def _log_eval_table(self, idx):
575577
"""Log the W&B Tables for model evaluation.

0 commit comments

Comments
 (0)