Skip to content

Commit af1218d

Browse files
authored
Merge pull request #83 from graphcore/FixWandb
log wandb only if wandb is enabled
2 parents 5d96fd5 + 7bc3e31 commit af1218d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nlp/gpt_j/popxl/run_finetuning_mnli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def training(config: GPTJConfig, session: TaskSession, pretrained):
149149
f"Duration: {duration:6.4f} s "
150150
f"Throughput: {throughput:6.1f} samples/s ")
151151
logging.info(result_str)
152-
if popdist.getInstanceIndex() == 0:
152+
if popdist.getInstanceIndex() == 0 and wandb.run is not None:
153153
wandb.log(
154154
{
155155
"Loss": loss,

0 commit comments

Comments
 (0)