Skip to content

Flush libc stdout/stderr in suppress_stdout_stderr - #2015

Open
AuroraWright wants to merge 1 commit into
abetlen:mainfrom
AuroraWright:libc_fflush
Open

AuroraWright wants to merge 1 commit into
abetlen:mainfrom
AuroraWright:libc_fflush

Conversation

@AuroraWright

Copy link
Copy Markdown

I was testing #1989 and I noticed that whenever my script terminated I would get all the output from clip_init, which uses suppress_stdout_stderr here https://github.com/abetlen/llama-cpp-python/blob/main/llama_cpp/llama_chat_format.py#L2708 . After a while of messing around with it, I figured the reason was that stdout was not being flushed before being redirected. I tried this PR on macOS and it works fine, might be worth testing on Linux/Windows too

This branch has not been deployed

No deployments
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.

1 participant