From 3b5441f05c6b4c18ee133a9a33e67a58650c3eaf Mon Sep 17 00:00:00 2001 From: "lev.telyatnikov" Date: Mon, 29 Apr 2024 18:25:05 -0400 Subject: [PATCH] correct tests --- test/transforms/feature_liftings/test_projection_sum.py | 4 ++-- test/transforms/liftings/graph2cell/test_cycle_lifting.py | 4 ++-- .../transforms/liftings/graph2hypergraph/test_khop_lifting.py | 4 ++-- .../liftings/graph2simplicial/test_clique_lifting.py | 4 ++-- tutorials/graph2simplicial/clique_lifting.ipynb | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/transforms/feature_liftings/test_projection_sum.py b/test/transforms/feature_liftings/test_projection_sum.py index 34c78e9d..108cb9fb 100644 --- a/test/transforms/feature_liftings/test_projection_sum.py +++ b/test/transforms/feature_liftings/test_projection_sum.py @@ -2,7 +2,7 @@ import torch -from modules.io.load.loaders import manual_simple_graph +from modules.io.utils.utils import load_manual_graph from modules.transforms.feature_liftings.feature_liftings import ProjectionSum from modules.transforms.liftings.graph2hypergraph.khop_lifting import ( HypergraphKHopLifting, @@ -17,7 +17,7 @@ class TestProjectionSum: def setup_method(self): # Load the graph - self.data = manual_simple_graph() + self.data = load_manual_graph() # Initialize the ProjectionLifting class self.feature_lifting = ProjectionSum() diff --git a/test/transforms/liftings/graph2cell/test_cycle_lifting.py b/test/transforms/liftings/graph2cell/test_cycle_lifting.py index 33d45974..fb6e4c1a 100644 --- a/test/transforms/liftings/graph2cell/test_cycle_lifting.py +++ b/test/transforms/liftings/graph2cell/test_cycle_lifting.py @@ -3,7 +3,7 @@ import rootutils import torch -from modules.io.load.loaders import manual_simple_graph +from modules.io.utils.utils import load_manual_graph from modules.transforms.liftings.graph2cell.cycle_lifting import CellCycleLifting @@ -12,7 +12,7 @@ class TestCellCyclesLifting: def setup_method(self): # Load the graph - self.data = manual_simple_graph() + self.data = load_manual_graph() # Initialise the CellCyclesLifting class self.lifting = CellCycleLifting() diff --git a/test/transforms/liftings/graph2hypergraph/test_khop_lifting.py b/test/transforms/liftings/graph2hypergraph/test_khop_lifting.py index a6568e76..2f810a0f 100644 --- a/test/transforms/liftings/graph2hypergraph/test_khop_lifting.py +++ b/test/transforms/liftings/graph2hypergraph/test_khop_lifting.py @@ -3,7 +3,7 @@ import rootutils import torch -from modules.io.load.loaders import manual_simple_graph +from modules.io.utils.utils import load_manual_graph from modules.transforms.liftings.graph2hypergraph.khop_lifting import ( HypergraphKHopLifting, ) @@ -14,7 +14,7 @@ class TestHypergraphKHopLifting: def setup_method(self): # Load the graph - self.data = manual_simple_graph() + self.data = load_manual_graph() # Initialise the HypergraphKHopLifting class self.lifting_k1 = HypergraphKHopLifting(k_value=1) diff --git a/test/transforms/liftings/graph2simplicial/test_clique_lifting.py b/test/transforms/liftings/graph2simplicial/test_clique_lifting.py index 243d9772..fee5bab4 100644 --- a/test/transforms/liftings/graph2simplicial/test_clique_lifting.py +++ b/test/transforms/liftings/graph2simplicial/test_clique_lifting.py @@ -3,7 +3,7 @@ import rootutils import torch -from modules.io.load.loaders import manual_simple_graph +from modules.io.utils.utils import load_manual_graph from modules.transforms.liftings.graph2simplicial.clique_lifting import ( SimplicialCliqueLifting, ) @@ -14,7 +14,7 @@ class TestSimplicialCliqueLifting: def setup_method(self): # Load the graph - self.data = manual_simple_graph() + self.data = load_manual_graph() # Initialise the SimplicialCliqueLifting class self.lifting_signed = SimplicialCliqueLifting(complex_dim=3, signed=True) diff --git a/tutorials/graph2simplicial/clique_lifting.ipynb b/tutorials/graph2simplicial/clique_lifting.ipynb index e2d299de..258d3202 100644 --- a/tutorials/graph2simplicial/clique_lifting.ipynb +++ b/tutorials/graph2simplicial/clique_lifting.ipynb @@ -52,10 +52,10 @@ "# With this cell any imported module is reloaded before each cell execution\n", "%load_ext autoreload\n", "%autoreload 2\n", - "import rootutils\n", + "#import rootutils\n", "import torch\n", "\n", - "rootutils.setup_root(\"./\", indicator=\".project-root\", pythonpath=True)\n", + "#rootutils.setup_root(\"./\", indicator=\".project-root\", pythonpath=True)\n", "from modules.io.load.loaders import GraphLoader\n", "from modules.io.preprocess.preprocessor import PreProcessor\n", "from modules.utils.utils import (\n",