We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 822fec4 commit a8ccab5Copy full SHA for a8ccab5
test/test_pythonkey.py
@@ -41,6 +41,14 @@
41
"`--no-deps` to avoid overwriting the pytorch installation",
42
UserWarning)
43
44
+USE_NETWORKX = False
45
+try:
46
+ import networkx # noqa: F401
47
+ USE_NETWORKX = True
48
+except ImportError:
49
+ warnings.warn("Some tests use networkx but it was not installed",
50
+ UserWarning)
51
+
52
# NB: numpy is a testing dependency!
53
54
@@ -424,6 +432,7 @@ def create_new_arg(x):
424
432
425
433
426
434
class TestPartitioning(TestCase):
435
+ @unittest.skipIf(not USE_NETWORKX, "networkx not available")
427
436
def test_recompute_partitioning(self):
428
437
def fn(a, b):
429
438
return torch.sin(torch.sin(a)) + b
0 commit comments