Skip to content

[CK Tools] Auto-enable unbuffered output for Python commands#3694

Closed
AviralGoelAMD wants to merge 2 commits intodevelopfrom
aviralgoel/python-unbuffered-fix
Closed

[CK Tools] Auto-enable unbuffered output for Python commands#3694
AviralGoelAMD wants to merge 2 commits intodevelopfrom
aviralgoel/python-unbuffered-fix

Conversation

@AviralGoelAMD
Copy link
Collaborator

ck-docker exec and ck-exec now automatically detect Python commands and set PYTHONUNBUFFERED=1 to enable live output streaming. This eliminates the need to manually set the environment variable when running Python scripts that print progress updates.

The detection matches python, python3, or any .py file argument.

This helps in watching live terminal output when a python script is running inside the container.

ck-docker exec and ck-exec now automatically detect Python commands
and set PYTHONUNBUFFERED=1 to enable live output streaming. This
eliminates the need to manually set the environment variable when
running Python scripts that print progress updates.

The detection matches python, python3, or any .py file argument.

Co-Authored-By: Claude (claude-opus-4.5) <noreply@anthropic.com>
@ammallya
Copy link
Contributor

ammallya commented Feb 3, 2026

Imported to ROCm/rocm-libraries

@ammallya ammallya closed this Feb 3, 2026
illsilin pushed a commit to ROCm/rocm-libraries that referenced this pull request Feb 10, 2026
ck-docker exec and ck-exec now automatically detect Python commands and
set PYTHONUNBUFFERED=1 to enable live output streaming. This eliminates
the need to manually set the environment variable when running Python
scripts that print progress updates.

The detection matches python, python3, or any .py file argument.

This helps in watching live terminal output when a python script is
running inside the container.



---
🔁 Imported from
[ROCm/composable_kernel#3694](ROCm/composable_kernel#3694)
🧑‍💻 Originally authored by @AviralGoelAMD

Co-authored-by: AviralGoelAMD <aviral.goel@amd.com>
Co-authored-by: Claude (claude-opus-4.5) <noreply@anthropic.com>
Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
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.

3 participants