Remove f-string in logging statement - #255
Conversation
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
|
/ok to test 540af3f |
Greptile SummaryThis PR replaces f-string interpolation in all logging statements across 9 source files and 3 test files with
Confidence Score: 5/5Safe to merge — all changes are mechanical logging-style conversions with no logic changes, and the ruff G004 rule will prevent regressions. Every change is a straightforward f-string-to-%-style substitution in logging calls. No logic, control flow, or data handling is modified. The ruff configuration addition is additive. No new device-to-host synchronizations are introduced. No files require special attention beyond the previously discussed logger-objects TOML placement in pyproject.toml. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["logging.debug(msg, *args) called"] --> B{Is DEBUG level active?}
B -- No --> C["No-op: format string never evaluated\n(args already evaluated by Python)"]
B -- Yes --> D["Python calls msg % args\n(string formatting happens here)"]
D --> E["Log record emitted to handler"]
style C fill:#d4edda,stroke:#28a745
style D fill:#fff3cd,stroke:#ffc107
style E fill:#cce5ff,stroke:#004085
Reviews (2): Last reviewed commit: "Merge branch 'main' into skyw/remove-fst..." | Re-trigger Greptile |
|
/ok to test 14a502c |
Changed them to lazy evaluation.
Through sequence of unfortunate events, we dropped ball and had device tensor in f-string in logging.
Having trivial host variable in f-string in logging is fine technically, but decided to enforce it.