mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
[ci, 3.13] fix/skip failing numpy 2.0+ dynamo-wrapped tests (#141950)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141950 Approved by: https://github.com/StrongerXi, https://github.com/atalman ghstack dependencies: #141409, #142003, #141572, #141577, #141605, #141621, #141623, #141673, #141674, #141858, #141862, #139533, #140733, #141859, #141860, #141886, #141887
This commit is contained in:
parent
fbd130a41f
commit
ae71240780
2 changed files with 10 additions and 1 deletions
|
|
@ -26,13 +26,18 @@ if TEST_WITH_TORCHDYNAMO:
|
|||
atleast_1d,
|
||||
atleast_2d,
|
||||
atleast_3d,
|
||||
AxisError,
|
||||
concatenate,
|
||||
hstack,
|
||||
newaxis,
|
||||
stack,
|
||||
vstack,
|
||||
)
|
||||
|
||||
if int(numpy.__version__[0]) >= 2:
|
||||
from numpy.exceptions import AxisError
|
||||
else:
|
||||
from numpy import AxisError
|
||||
|
||||
from numpy.testing import assert_, assert_array_equal, assert_equal
|
||||
else:
|
||||
import torch._numpy as np
|
||||
|
|
|
|||
|
|
@ -666,6 +666,10 @@ class TestSetOps(TestCase):
|
|||
|
||||
@instantiate_parametrized_tests
|
||||
class TestUnique(TestCase):
|
||||
@skipIf(
|
||||
TEST_WITH_TORCHDYNAMO and int(numpy.__version__[0]) >= 2,
|
||||
"fails with dynamo and numpy >= 2.0",
|
||||
)
|
||||
def test_unique_1d(self):
|
||||
def check_all(a, b, i1, i2, c, dt):
|
||||
base_msg = "check {0} failed for type {1}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue