Skip to content

Commit c84d3f7

Browse files
committed
lint
1 parent 347acf8 commit c84d3f7

27 files changed

+19
-59
lines changed

_doc/examples/plot_export_tiny_phi2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989

9090

9191
with torch_export_patches(patch_transformers=True):
92-
9392
# Two unnecessary steps but useful in case of an error
9493
# We check the cache is registered.
9594
assert is_cache_dynamic_registered()

_unittests/ut_export/test_shape_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717

1818
class TestShapeHelper(ExtTestCase):
19-
2019
@requires_transformers("4.52")
2120
@requires_torch("2.7.99")
2221
def test_all_dynamic_shape_from_cache(self):

_unittests/ut_helpers/test_onnx_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727

2828
class TestOnnxHelper(ExtTestCase):
29-
3029
def _get_model(self):
3130
model = oh.make_model(
3231
oh.make_graph(

_unittests/ut_helpers/test_ort_session.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525

2626
class TestOrtSession(ExtTestCase):
27-
2827
@classmethod
2928
def _range(cls, *shape, bias: Optional[float] = None):
3029
n = np.prod(shape)

_unittests/ut_helpers/test_ort_session_tinyllm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020

2121
class TestOrtSessionTinyLLM(ExtTestCase):
22-
2322
def test_ort_value(self):
2423
val = np.array([30, 31, 32], dtype=np.int64)
2524
ort = ORTC.OrtValue.ortvalue_from_numpy_with_onnx_type(val, onnx.TensorProto.INT64)

_unittests/ut_helpers/test_torch_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333

3434
class TestTorchTestHelper(ExtTestCase):
35-
3635
def test_is_torchdynamo_exporting(self):
3736
self.assertFalse(is_torchdynamo_exporting())
3837

_unittests/ut_reference/test_onnxruntime_evaluator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
class TestOnnxruntimeEvaluator(ExtTestCase):
2525
def test_ort_eval_scan_cdist_add(self):
26-
2726
def dist(unused: torch.Tensor, x: torch.Tensor, samex: torch.Tensor):
2827
sub = samex - x.reshape((1, -1))
2928
sq = sub * sub

_unittests/ut_torch_export_patches/test_dynamic_class.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def unflatten_my_cache_78(values, context: TreeContext, output_type=None) -> MyC
227227

228228
@ignore_warnings(UserWarning)
229229
def test_export_dynamic_cache_cat(self):
230-
231230
class ModelDynamicCache(torch.nn.Module):
232231
def forward(self, x, dc):
233232
y = (

_unittests/ut_torch_export_patches/test_patch_expressions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212

1313
class TestOnnxExportErrors(ExtTestCase):
14-
1514
@classmethod
1615
def setUp(cls):
1716
register_patched_expressions()

_unittests/ut_torch_export_patches/test_patch_loops.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@
1414

1515

1616
class TestOnnxExportErrors(ExtTestCase):
17-
1817
def test_patched_expressions(self):
1918
res = list(_iterate_patched_expressions())
2019
names = {_[0] for _ in res}
2120
self.assertIn("float_arange", names)
2221

2322
@requires_torch("2.8")
2423
def test_filter_position_ids(self):
25-
2624
def filter_position_ids(
2725
patch_attention_mask: torch.Tensor,
2826
position_ids: torch.Tensor,
@@ -57,7 +55,6 @@ def scan_filter_position_ids(
5755
boundaries: torch.Tensor,
5856
num_patches_per_side: int,
5957
):
60-
6158
def body(p_attn_mask, position_ids_row):
6259
h_len = torch.tensor(1) / p_attn_mask[:, 0].sum()
6360
w_len = torch.tensor(1) / p_attn_mask[0].sum()

0 commit comments

Comments
 (0)