mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "Enable all PIE rules on ruff (#165814)"
This reverts commit c79dfdc6550e872783aa5cb5fc9e86589bf18872. Reverted https://github.com/pytorch/pytorch/pull/165814 on behalf of https://github.com/cyyever due to Need to cover more files ([comment](https://github.com/pytorch/pytorch/pull/165814#issuecomment-3417931863))
This commit is contained in:
@ -1710,7 +1710,7 @@ class TestReductions(TestCase):
|
||||
with_extremal=False, atol=None, rtol=None,
|
||||
exact_dtype=True, with_keepdim=False):
|
||||
# Test 0-d to 3-d tensors.
|
||||
for ndims in range(4):
|
||||
for ndims in range(0, 4):
|
||||
shape = _rand_shape(ndims, min_size=5, max_size=10)
|
||||
for n in range(ndims + 1):
|
||||
for c in combinations(list(range(ndims)), n):
|
||||
@ -2623,7 +2623,7 @@ class TestReductions(TestCase):
|
||||
# Generate some random test cases
|
||||
ops = ['quantile', 'nanquantile']
|
||||
inputs = [tuple(np.random.randint(2, 10, size=i)) for i in range(1, 4)]
|
||||
quantiles = [tuple(np.random.rand(i)) for i in range(5)]
|
||||
quantiles = [tuple(np.random.rand(i)) for i in range(0, 5)]
|
||||
keepdims = [True, False]
|
||||
|
||||
# Add corner cases
|
||||
|
Reference in New Issue
Block a user