From 6ea8fa870e9452bb548b7254428934d84172c8e5 Mon Sep 17 00:00:00 2001 From: massquantity Date: Fri, 4 Jul 2025 20:28:04 +0800 Subject: [PATCH] [Test] Skip dgl tests on macOS --- tests/models/test_graphsage_dgl.py | 5 +++++ tests/models/test_pinsage_dgl.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/models/test_graphsage_dgl.py b/tests/models/test_graphsage_dgl.py index 375f9dc0..7630b018 100644 --- a/tests/models/test_graphsage_dgl.py +++ b/tests/models/test_graphsage_dgl.py @@ -134,6 +134,11 @@ def test_graphsage_dgl( pytest.skip( "Windows and macOS use `spawn` in multiprocessing, which does not work well in pytest" ) + if sys.platform == "darwin": + pytest.skip( + "DGL is incompatible with macOS, which uses torch.mps" + ) + tf.compat.v1.reset_default_graph() pd_data, train_data, eval_data, data_info = feat_data_small if task == "ranking" and neg_sampling is False and loss_type == "cross_entropy": diff --git a/tests/models/test_pinsage_dgl.py b/tests/models/test_pinsage_dgl.py index 85eceb0c..769825ce 100644 --- a/tests/models/test_pinsage_dgl.py +++ b/tests/models/test_pinsage_dgl.py @@ -143,6 +143,11 @@ def test_pinsage_dgl( pytest.skip( "Windows and macOS use `spawn` in multiprocessing, which does not work well in pytest" ) + if sys.platform == "darwin": + pytest.skip( + "DGL is incompatible with macOS, which uses torch.mps" + ) + tf.compat.v1.reset_default_graph() pd_data, train_data, eval_data, data_info = feat_data_small if task == "ranking" and neg_sampling is False and loss_type == "cross_entropy":