Skip to content
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

Flush console output after every message. #5415

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Flush console output after every message. #5415

merged 1 commit into from
Feb 7, 2025

Conversation

afourney
Copy link
Member

@afourney afourney commented Feb 7, 2025

In some settings, like agbench running via the Docker API, console output is not automatically flushed after newlines (I believe this is only the default for interactive terminals). This make it very difficult to monitor the progress of tasks.

This PR simply restores the flush argument to aprint, and sets it to True after every message or toplevel event. Streaming interactions continue to be buffered.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.09%. Comparing base (3c30d89) to head (5be190c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...gen-agentchat/src/autogen_agentchat/ui/_console.py 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5415      +/-   ##
==========================================
+ Coverage   78.08%   78.09%   +0.01%     
==========================================
  Files         158      158              
  Lines        9576     9576              
==========================================
+ Hits         7477     7478       +1     
+ Misses       2099     2098       -1     
Flag Coverage Δ
unittests 78.09% <50.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@afourney afourney merged commit 4c1c12d into main Feb 7, 2025
64 of 65 checks passed
@afourney afourney deleted the flush_console branch February 7, 2025 06:20
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.

2 participants