"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "403d530eec105c0e229fc2b754afdf77a4439def"
Unverified Commit a4340d3b authored by Alex Hedges's avatar Alex Hedges Committed by GitHub
Browse files

Set tb_writer to None in TensorBoardCallback.on_train_end() (#12963)

parent 3d4b3bc3
...@@ -401,6 +401,7 @@ class TensorBoardCallback(TrainerCallback): ...@@ -401,6 +401,7 @@ class TensorBoardCallback(TrainerCallback):
def on_train_end(self, args, state, control, **kwargs): def on_train_end(self, args, state, control, **kwargs):
if self.tb_writer: if self.tb_writer:
self.tb_writer.close() self.tb_writer.close()
self.tb_writer = None
class WandbCallback(TrainerCallback): class WandbCallback(TrainerCallback):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment