What happens to stdout/stderr of worker processes in TP runs?

Using multiprocessing mp as distributed backend, what happens to the outputs written to stdout/stderr by worker processes? I noticed the outputs originated from vLLM code do appear on screen (prefixed with worked PID). I have some instrumentation that writes outputs to stderr, I wonder if it’s possible to capture it from worker processes as well.

/ Nelson

Welcome to investigate and show your finding!

I suppose they have their own stdout / stderr, vLLM does not do anything to them, but adding some prefix. The code should be: