Skip to content

Conversation

@lgarithm
Copy link
Member

@lgarithm lgarithm commented Jan 4, 2018

No description provided.

@lgarithm lgarithm requested a review from luomai January 4, 2018 16:54
@jorgemf
Copy link
Contributor

jorgemf commented Jan 4, 2018

I notice this issue too. I also read the normal behavior in Linux is to buffer the output (it sounds strange for me but I bought it). My solution was to use the logging package for printing more info and to configure it to flush the output more often. I am working on another example that does this, once I am completely sure it works I will do the PR (also fix other bugs in the distributed mode).

@zsdonghao
Copy link
Member

@luomai could you help to review it?

BTW, to add new API to the documentation, see docs/modules/xxx.rst.

@jorgemf
Copy link
Contributor

jorgemf commented Jan 5, 2018

Another way to unbuffer the python output is to set the environment variable PYTHONUNBUFFERED=1. So we don't need to touch any code

@luomai
Copy link
Member

luomai commented Jan 6, 2018

@jorgemf totally agree. A more fundamental solution would be to use logger instead of print in, at least, the distributed and docker examples.

@lgarithm
Copy link
Member Author

lgarithm commented Jan 6, 2018

yes, and I think the best place to add it is in the Dockerfile.

@luomai luomai merged commit 7f0ccb8 into tensorlayer:master Jan 6, 2018
@lgarithm lgarithm deleted the setlinebuf branch January 10, 2018 14:47
luomai added a commit that referenced this pull request Nov 21, 2018
add setlinebuf helper function and call it in distributed example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants