How about the max_queue argument set to 1?
writer = SummaryWriter("logs", maxqueue=1)

https://tensorboardx.readthedocs.io/en/latest/tensorboard.html 2
The default argument is 10 so the writer should at least log 5 times to disk… that’s weird anyway
EDIT: just found out the flush_secs=120 default argument in the writer documentation