Skip to content

Flush libc stdout/stderr in suppress_stdout_stderr #2015

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AuroraWright
Copy link

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

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