SwanLab icon indicating copy to clipboard operation
SwanLab copied to clipboard

[QUESTION] Console Buffer

Open Feudalman opened this issue 1 year ago • 0 comments

🤔 Question description [Please make everyone to understand it]

We have the Consonler class to controll the prints and logs, sending them to terminal and log file. But in different process models, initialization parameter passing varies.

image

1. In the main process Only allow one buffer: super().__init__(sys.stdout.buffer)

2. In Subprocess Two buffer required: super().__init__(buffer1, buffer2)


To handle it, we can do this:

img_v3_027l_0163468c-b1ad-4689-b700-3ce2935958dg

Feudalman avatar Feb 01 '24 13:02 Feudalman