ruff cleanup (#4594)

* check editor config

* no editorconfig, it doesn't work

* ruff cleanups
This commit is contained in:
George Hotz
2024-05-14 21:16:14 -07:00
committed by GitHub
parent 7f009cf9fa
commit afa9753d39
8 changed files with 7 additions and 14 deletions

View File

@@ -378,7 +378,6 @@ class TestIndexing(unittest.TestCase):
numpy_testing_assert_equal_helper(strided[rows, columns],
np.array([[1, 3], [11, 13]]))
# setting values
# strided is [[10, 11],

View File

@@ -25,7 +25,6 @@ def st_shape(draw) -> tuple[int, ...]:
assume(prod([d for d in s if d]) <= 1024 ** 4)
return s
def tensors_for_shape(s:tuple[int, ...]) -> tuple[torch.tensor, Tensor]:
x = np.arange(prod(s)).reshape(s)
return torch.from_numpy(x), Tensor(x)
@@ -51,7 +50,6 @@ class TestShapeOps(unittest.TestCase):
assert len(tor) == len(ten)
assert all([np.array_equal(tor.numpy(), ten.numpy()) for (tor, ten) in zip(tor, ten)])
@settings.get_profile(__file__)
@given(st_shape(), st_int32, st_int32)
def test_chunk(self, s:tuple[int, ...], dim:int, num:int):

View File

@@ -182,7 +182,6 @@ class TestNN(unittest.TestCase):
np.testing.assert_allclose(gb.numpy(), torch_layer.bias.grad.numpy(), atol=5e-4, rtol=1e-5)
np.testing.assert_allclose(gx.numpy(), torch_x.grad.numpy(), atol=5e-4, rtol=1e-5)
@unittest.skipIf(CI and Device.DEFAULT == "WEBGPU", "runs out of memory in CI")
def test_conv_transpose1d(self):
BS, C1, W = 4, 16, 224//4