0

Background:

I'm a novice deep learning engineer, and I'm not good at TensorBoard yet

Problem:

I want to use a magic command, or some other ways, so jupyter notebook can save the output of a cell to a file in REAL-TIME, so I can see when training, what's the process, should I stop early, and so on.

I've tried %%capture, but I can only see the results after execution, not in REAL TIME.

Walker
  • 109
  • 1
  • 9
  • 1
    what do you mean by "the output of a cell"? You mean what the code in the cell is printing? Perhaps you should just redirect stdout to the file – juanpa.arrivillaga Aug 24 '21 at 21:28
  • @juanpa.arrivillaga Correct. But how do I redirect stdout? – Walker Aug 24 '21 at 21:29
  • 1
    Note, the accepted solution in the linked duplicate shows a manual one, but you should probably use the built-in `contextlib.redirect_stdout`, i.e. [this answer in the linked duplicate](https://stackoverflow.com/a/22434262/5014455) – juanpa.arrivillaga Aug 24 '21 at 21:31

0 Answers0