[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
@@ -20,7 +20,6 @@ TORCH_DTYPES = [torch.float32]
class TestCrossEncoderModels(CustomTestCase):
@classmethod
def setUpClass(cls):
mp.set_start_method("spawn", force=True)
@@ -55,9 +54,9 @@ class TestCrossEncoderModels(CustomTestCase):
for i in range(len(srt_scores)):
score_difference = abs(hf_scores[i] - srt_scores[i])
assert (
score_difference < score_tolerance
), "cross encoder scores are not all close"
assert score_difference < score_tolerance, (
"cross encoder scores are not all close"
)
def preprocess_prompts(self, prompt):
processed_prompts = []
@@ -37,7 +37,6 @@ sgl_to_st_ratio = []
class TestEncoderEmbeddingModels(CustomTestCase):
@classmethod
def setUpClass(cls):
mp.set_start_method("spawn", force=True)
@@ -115,9 +114,9 @@ class TestEncoderEmbeddingModels(CustomTestCase):
# print("similarity diff", abs(similarity - 1))
if len(truncated_prompts[i]) <= 1000:
assert torch.all(
abs(similarity - 1) < prefill_tolerance
), "embeddings are not all close"
assert torch.all(abs(similarity - 1) < prefill_tolerance), (
"embeddings are not all close"
)
def test_prefill_logits(self):
models_to_test = MODELS