Can you try to remove
metric_logger.update(loss=losses_reduced, **loss_dict_reduced)
It seems a tensor which carries the whole graph hist.
If you want to log the loss  log this one loss_value = losses_reduced.item() which is a python float.