CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

CNTK directs console output to stderr

Open alexeyo26 opened this issue 10 years ago • 4 comments

Currently CNTK directs all console output to stderr rather than stdout. Was it for a reason?

alexeyo26 avatar Jan 26 '16 12:01 alexeyo26

I think only “payload” output (such as rec output) should go to stdout. All other errors, warnings and informational messages should go to stderr.

Andreas

From: Alexey Orlov [mailto:[email protected]] Sent: Tuesday, January 26, 2016 4:18 AM To: Microsoft/CNTK [email protected] Subject: [CNTK] CNTK directs console output to stderr (#25)

Currently CNTK directs all console output to stderr rather than stdout. Was it for a reason?

— Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/CNTK/issues/25.

stolcke avatar Jan 27 '16 20:01 stolcke

Andreas, you said and informational messages. (to stderr). I believe this is exactly what we have now. Moreover, if I invoke, e.g., Simple2d example, nothing goes to stdout. If that's the way we believe it should be, fine. Just wanted to clarify.

alexeyo26 avatar Jan 27 '16 20:01 alexeyo26

Any actual output data should go to stdout, while messages, informational or errors, should be on stderr. I don’t think we have any data output at present. But I can imagine writing to stdout instead of a file e.g. for integrating with pipe-based tools like Kaldi. Since that may be binary data, we should keep stdout pristine.

From: Alexey Orlov [mailto:[email protected]] Sent: Wednesday, January 27, 2016 12:52 To: Microsoft/CNTK [email protected] Subject: Re: [CNTK] CNTK directs console output to stderr (#25)

Andreas, you said and informational messages. (to stderr). I believe this is exactly what we have now. Moreover, if I invoke, e.g., Simple2d example, nothing goes to stdout. If that's the way we believe it should be, fine. Just wanted to clarify.

— Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/CNTK/issues/25#issuecomment-175847549.

frankseide avatar Jan 28 '16 00:01 frankseide

To the best of our knowledge CNTK adheres to the UNIX model:

  • data to stdout
  • messages to stderr

Issue closed

alexeyo26 avatar Jan 28 '16 16:01 alexeyo26