mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 17:37:07 +08:00
Fix excessive buffering of worker stdout/stderr. (#4094)
* Start workers with 'python -u' to prevent buffering of prints. * Set sys.stdout and sys.stderr. * Add comment.
This commit is contained in:
committed by
Philipp Moritz
parent
5fe7b1c618
commit
e7651b1117
+1
-1
@@ -223,7 +223,7 @@ class Node(object):
|
||||
suffix=".out", prefix=name, directory_name=self._logs_dir)
|
||||
log_stderr = self._make_inc_temp(
|
||||
suffix=".err", prefix=name, directory_name=self._logs_dir)
|
||||
# Line-buffer the output (mode 1)
|
||||
# Line-buffer the output (mode 1).
|
||||
log_stdout_file = open(log_stdout, "a", buffering=1)
|
||||
log_stderr_file = open(log_stderr, "a", buffering=1)
|
||||
return log_stdout_file, log_stderr_file
|
||||
|
||||
Reference in New Issue
Block a user