Skip to content

Commit

Permalink
Removed unintentially modified files
Browse files Browse the repository at this point in the history
  • Loading branch information
mmasden committed Jul 10, 2024
1 parent 6c38d3a commit 4d0019d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 32 deletions.
16 changes: 8 additions & 8 deletions modules/data/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ def get_complex_connectivity(complex, max_rank, signed=False):
)
except ValueError: # noqa: PERF203
if connectivity_info == "incidence":
connectivity[
f"{connectivity_info}_{rank_idx}"
] = generate_zero_sparse_connectivity(
m=practical_shape[rank_idx - 1], n=practical_shape[rank_idx]
connectivity[f"{connectivity_info}_{rank_idx}"] = (
generate_zero_sparse_connectivity(
m=practical_shape[rank_idx - 1], n=practical_shape[rank_idx]
)
)
else:
connectivity[
f"{connectivity_info}_{rank_idx}"
] = generate_zero_sparse_connectivity(
m=practical_shape[rank_idx], n=practical_shape[rank_idx]
connectivity[f"{connectivity_info}_{rank_idx}"] = (
generate_zero_sparse_connectivity(
m=practical_shape[rank_idx], n=practical_shape[rank_idx]
)
)
connectivity["shape"] = practical_shape
return connectivity
Expand Down
4 changes: 1 addition & 3 deletions modules/transforms/feature_liftings/feature_liftings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def lift_features(
-------
torch_geometric.data.Data | dict
The lifted data."""
keys = sorted(
[key.split("_")[1] for key in data.keys() if "incidence" in key]
) # noqa : SIM118
keys = sorted([key.split("_")[1] for key in data.keys() if "incidence" in key]) # noqa : SIM118
for elem in keys:
if f"x_{elem}" not in data:
idx_to_project = 0 if elem == "hyperedges" else int(elem) - 1
Expand Down
2 changes: 0 additions & 2 deletions modules/transforms/liftings/graph2hypergraph/knn_lifting.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ def lift_topology(self, data: torch_geometric.data.Data) -> dict:
data_lifted.edge_index[:, idx] = torch.tensor([[i, i]]).T

incidence_1[data_lifted.edge_index[1], data_lifted.edge_index[0]] = 1

incidence_1 = torch.Tensor(incidence_1).to_sparse_coo()

return {
"incidence_hyperedges": incidence_1,
"num_hyperedges": num_hyperedges,
Expand Down
6 changes: 3 additions & 3 deletions tutorials/graph2hypergraph/knn_lifting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "venv_topox",
"language": "python",
"name": "python3"
},
Expand All @@ -339,9 +339,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
"nbformat_minor": 2
}
20 changes: 4 additions & 16 deletions tutorials/graph2simplicial/clique_lifting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,7 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'modules'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/tmp/ipykernel_50472/3754984083.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'load_ext'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'autoreload'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'autoreload'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'2'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmodules\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloaders\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mGraphLoader\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmodules\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpreprocess\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpreprocessor\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mPreProcessor\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m from modules.utils.utils import (\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'modules'"
]
}
],
"outputs": [],
"source": [
"# With this cell any imported module is reloaded before each cell execution\n",
"%load_ext autoreload\n",
Expand Down Expand Up @@ -372,7 +360,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "venv_topox",
"language": "python",
"name": "python3"
},
Expand All @@ -386,9 +374,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
"nbformat_minor": 2
}

0 comments on commit 4d0019d

Please sign in to comment.