[CI][RFC] Replace black-jupyter with ruff-format (#37210)

Co-authored-by: Alison Shao <a.shao@wustl.edu>
This commit is contained in:
Alex Nails
2026-09-02 19:46:08 -07:00
committed by GitHub
co-authored by Alison Shao
parent 2641e427be
commit 28262c20df
1411 changed files with 7766 additions and 8176 deletions
@@ -274,12 +274,12 @@ def compare_outputs(trtllm_out, reference_out, tolerance=1e-2):
"""Compare outputs with detailed analysis."""
# Basic checks
assert (
trtllm_out.shape == reference_out.shape
), f"Shape mismatch: {trtllm_out.shape} vs {reference_out.shape}"
assert (
trtllm_out.dtype == reference_out.dtype
), f"Dtype mismatch: {trtllm_out.dtype} vs {reference_out.dtype}"
assert trtllm_out.shape == reference_out.shape, (
f"Shape mismatch: {trtllm_out.shape} vs {reference_out.shape}"
)
assert trtllm_out.dtype == reference_out.dtype, (
f"Dtype mismatch: {trtllm_out.dtype} vs {reference_out.dtype}"
)
# Check for NaN/Inf
assert not torch.isnan(trtllm_out).any(), "TRTLLM output contains NaN"
@@ -310,7 +310,7 @@ def compare_outputs(trtllm_out, reference_out, tolerance=1e-2):
trt_val = trtllm_out[idx_tuple].item()
ref_val = reference_out[idx_tuple].item()
print(
f" [{idx_tuple}]: TRTLLM={trt_val:.6f}, Reference={ref_val:.6f}, diff={abs(trt_val-ref_val):.6f}"
f" [{idx_tuple}]: TRTLLM={trt_val:.6f}, Reference={ref_val:.6f}, diff={abs(trt_val - ref_val):.6f}"
)
return all_close