Thanks for your kind reply! I create two conda environments, torch1.6 and torch1.9 respectively.
Running the working example, I can confirm the logging issue exists in torch1.9 while not in torch1.6.

image1805×411 77.2 KB


image2111×671 174 KB

If I replace logging with loguru as suggested by ibro45, the weird behavior disappeared in torch1.9.
I wonder if we are using the same test case. Can you share your test files?