mirror of https://github.com/explosion/spaCy.git
Make ConsoleLogger flush after each logging line (#8810)
This is necessary to avoid "logging blackouts" when running training on Kubernetes pods
This commit is contained in:
parent
30f20496d5
commit
de076194c4
|
@ -29,7 +29,7 @@ def console_logger(progress_bar: bool = False):
|
|||
def setup_printer(
|
||||
nlp: "Language", stdout: IO = sys.stdout, stderr: IO = sys.stderr
|
||||
) -> Tuple[Callable[[Optional[Dict[str, Any]]], None], Callable[[], None]]:
|
||||
write = lambda text: stdout.write(f"{text}\n")
|
||||
write = lambda text: print(text, file=stdout, flush=True)
|
||||
msg = Printer(no_print=True)
|
||||
# ensure that only trainable components are logged
|
||||
logged_pipes = [
|
||||
|
|
Loading…
Reference in New Issue