Repository navigation
Name the encoding on the sd.cpp nvidia-smi probe - #18295
Conversation
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Name the encoding on the sd.cpp nvidia-smi probe
studio/backend/tests/test_text_io_encoding.py::test_text_io_names_its_encoding[sd_cpp_backend.py]fails onmainsince #18210. On staging it shows up as(Python 3.13, rest)failing on unrelated PRs, for example #17694 and #18275:Cause
#18210 added
_sole_nvidia_card_mib(), which reads nvidia-smi's output withsubprocess.run(..., text = True)but noencoding. That falls back tolocale.getencoding(), the ANSI codepage on Windows, which is exactly what this lint exists to catch.The other three
subprocess.run(text = True)calls insd_cpp_backend.pyalready passencoding = "utf-8", errors = "replace". The new probe just missed it.Fix
The probe now passes
encoding = "utf-8", errors = "replace"like its neighbours. nvidia-smi's CSV output is ASCII, so what the probe parses does not change. A stray byte can no longer raise inside the probe.Verification
tests/test_text_io_encoding.py: fails onmainon this line and passes with this change.tests/test_sd_cpp_backend.pyalso passes: 1289 passed across both files.