Hi,
It doesn’t seem to be related to DDP or pytorch, but to how logging module is setup. If you remove all the torch code, you would still get the same result.
def main():
    logger = logging.getLogger('train')
    logger.setLevel(logging.DEBUG)
    logger.info(f'in main.')

Does it block you in any way?