New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging doesn't produce any output in console or in Jupyter #3047

Closed
ilblackdragon opened this Issue Jun 25, 2016 · 10 comments

Comments

Projects
None yet
9 participants
@ilblackdragon
Copy link
Contributor

ilblackdragon commented Jun 25, 2016

Currently running examples leads to a void of empty output.
Both in console and in Jupyter notebooks. Which for example of LinearClassifier leads to a "stuck" model because steps by default is None.

@martinwicke

This comment has been minimized.

Copy link
Member

martinwicke commented Jun 29, 2016

Should we simply force --alsologtostderr, at least in opensource (only file logging is highly unusual), and possibly whenever we detect we're running in an interactive environment?

@martinwicke

This comment has been minimized.

Copy link
Member

martinwicke commented Jun 30, 2016

Hm. So the logger is already configured to make a StreamHandler which should by default point to stderr (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/platform/tf_logging.py#L46). Does jupyter discard stderr? Do we have to log to stdout for it to show up?

@aselle

This comment has been minimized.

Copy link
Member

aselle commented Jul 9, 2016

Automatically closing due to lack of recent activity. Please reopen when further information becomes available.

@aselle aselle closed this Jul 9, 2016

@ilblackdragon

This comment has been minimized.

Copy link
Contributor

ilblackdragon commented Sep 10, 2016

So to make it work in Jupyter, one right now needs to add
tf.logging.set_verbosity(tf.logging.INFO). Also it prints right now in red as it's stderr.

We should support a way to print into stdout and by default show INFO.

@drpngx

This comment has been minimized.

Copy link
Member

drpngx commented Oct 26, 2016

Is this still current?

@martinwicke

This comment has been minimized.

Copy link
Member

martinwicke commented Oct 26, 2016

@zheng-xq zheng-xq closed this in 92c8c69 Oct 30, 2016

benoitsteiner added a commit to benoitsteiner/tensorflow that referenced this issue Nov 15, 2016

If run in an interactive python environment, log to stdout (not stder…
…r) and set default logging verbosity to info. Fixes tensorflow#3047.

Change: 137464619

benoitsteiner added a commit to benoitsteiner/tensorflow that referenced this issue Nov 16, 2016

If run in an interactive python environment, log to stdout (not stder…
…r) and set default logging verbosity to info. Fixes tensorflow#3047.

Change: 137464619
@dashesy

This comment has been minimized.

Copy link

dashesy commented Jul 6, 2017

@ilblackdragon setting tf.logging.set_verbosity(tf.logging.INFO) did not produce any logging in Jupyter (QtConsole) for me, but I can see the logs in ipython shell.
So, following the documents here will not produce any logs as expected.

@andimarafioti

This comment has been minimized.

Copy link

andimarafioti commented Nov 14, 2017

EDIT: My logging is done not in the actual notebook but in the terminal where I started the notebook.

@tengerye

This comment has been minimized.

Copy link

tengerye commented Dec 4, 2017

No logging for me, either.

@samuela

This comment has been minimized.

Copy link

samuela commented Jul 24, 2018

FWIW this isn't working for me either. I'm not running in ipython/jupyter. I've tried tf.logging.set_verbosity(tf.logging.DEBUG), tf.logging.set_verbosity(0), and pretty much everything else I can think of. But I'm not seeing anything from tf.logging.info(...) in stdout or stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment