Skip to content

Commit

Permalink
Merge pull request #732 from AlexKurek/main
Browse files Browse the repository at this point in the history
Remove unused modules
  • Loading branch information
RasmusOrsoe authored Aug 7, 2024
2 parents 6e78d88 + da17d21 commit 3a34edb
Show file tree
Hide file tree
Showing 20 changed files with 14 additions and 30 deletions.
1 change: 0 additions & 1 deletion examples/01_icetray/01_convert_i3_files.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Example of converting I3-files to SQLite and Parquet."""

import os
from glob import glob

from graphnet.constants import EXAMPLE_OUTPUT_DIR, TEST_DATA_DIR
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/data/dataconverter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Contains `DataConverter`."""

from typing import List, Union, OrderedDict, Dict, Tuple, Any, Optional, Type
from abc import abstractmethod, ABC
from abc import ABC

from tqdm import tqdm
import numpy as np
Expand Down
9 changes: 0 additions & 9 deletions src/graphnet/data/dataset/parquet/parquet_dataset.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
"""Base :py:class:`Dataset` class(es) used in GraphNeT."""

from copy import deepcopy
from abc import ABC, abstractmethod
from typing import (
cast,
Any,
Callable,
Dict,
List,
Optional,
Tuple,
Union,
Iterable,
Type,
)

import numpy as np
Expand All @@ -21,7 +13,6 @@
from torch_geometric.data import Data
import polars as pol
from polars.series.series import Series
from polars.exceptions import InvalidOperationError
from glob import glob
from bisect import bisect_right
from collections import OrderedDict
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/data/parquet/deprecated_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This code will be removed in GraphNeT 2.0.
"""
from typing import List, Union, Type
from typing import List, Union

from graphnet.data.extractors.icecube import I3Extractor
from graphnet.data.extractors.icecube.utilities.i3_filters import (
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/data/pre_configured/dataconverters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Pre-configured combinations of writers and readers."""

from typing import List, Union, Type
from typing import List, Union

from graphnet.data import DataConverter
from graphnet.data.readers import I3Reader, ParquetReader
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/data/readers/i3reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Module containing different I3Reader."""

from typing import List, Union, OrderedDict, Type
from typing import List, Union, OrderedDict

from graphnet.utilities.imports import has_icecube_package
from graphnet.data.extractors.icecube.utilities.i3_filters import (
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/data/writers/parquet_writer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""DataConverter for the Parquet backend."""

import os
from typing import List, Optional, Dict, Any
from typing import List, Dict, Any

import pandas as pd
import polars as pol
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/deployment/icecube/cleaning_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contains functionality for writing model predictions to i3 files.
"""
from typing import List, Union, Optional, TYPE_CHECKING, Dict, Any, Tuple
from typing import List, Union, TYPE_CHECKING, Dict, Any, Tuple

import numpy as np

Expand Down
1 change: 0 additions & 1 deletion src/graphnet/models/easy_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from pytorch_lightning.loggers import Logger as LightningLogger

from graphnet.training.callbacks import ProgressBar
from graphnet.models.graphs import GraphDefinition
from graphnet.models.model import Model
from graphnet.models.task import StandardLearnedTask

Expand Down
3 changes: 1 addition & 2 deletions src/graphnet/models/gnn/RNN_tito.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""RNN_DynEdge model implementation."""
from typing import List, Optional, Tuple, Union
from typing import List, Optional, Tuple

import torch
from graphnet.models.gnn.gnn import GNN
from graphnet.models.gnn.dynedge import DynEdge
from graphnet.models.gnn.dynedge_kaggle_tito import DynEdgeTITO
from graphnet.models.rnn.node_rnn import Node_RNN

Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/models/gnn/dynedge.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Implementation of the DynEdge GNN model architecture."""
from typing import List, Optional, Callable, Tuple, Union
from typing import List, Optional, Tuple, Union

import torch
from torch import Tensor, LongTensor
Expand Down
1 change: 0 additions & 1 deletion src/graphnet/models/gnn/dynedge_jinst.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Author: Rasmus Oersoe
"""
from typing import Optional

import torch
from torch import Tensor
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/models/gnn/dynedge_kaggle_tito.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Solution by TITO.
"""

from typing import List, Tuple, Optional, Union
from typing import List, Tuple, Optional

import torch
from torch import Tensor, LongTensor
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/models/graphs/edges/edges.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Class(es) for building/connecting graphs."""

from typing import List
from abc import abstractmethod, ABC
from abc import abstractmethod

import torch
from torch_geometric.nn import knn_graph, radius_graph
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/models/graphs/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from .graph_definition import GraphDefinition
from graphnet.models.detector import Detector
from graphnet.models.graphs.edges import EdgeDefinition, KNNEdges
from graphnet.models.graphs.edges import KNNEdges
from graphnet.models.graphs.nodes import NodeDefinition, NodesAsPulses


Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/models/graphs/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Utility functions for construction of graphs."""

from typing import List, Tuple, Optional, Dict, Union
from typing import List, Tuple
import os
import numpy as np
import pandas as pd
Expand Down
2 changes: 0 additions & 2 deletions src/graphnet/models/task/classification.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Classification-specific `Model` class(es)."""

from typing import Any

import torch
from torch import Tensor

Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/utilities/filesys.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pathlib import Path
import re
from typing import List, Optional, Tuple, Union, cast
from typing import List, Optional, Tuple, Union


def is_gcd_file(filename: str) -> bool:
Expand Down
1 change: 0 additions & 1 deletion tests/models/test_coarsening.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import torch
from torch_geometric.data import Data, Batch

from graphnet.models.components.pool import group_by
from graphnet.models.coarsening import AttributeCoarsening


Expand Down
2 changes: 1 addition & 1 deletion tests/models/test_minkowski.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch
from torch_geometric.data.data import Data

from graphnet.models.graphs.edges import KNNEdges, MinkowskiKNNEdges
from graphnet.models.graphs.edges import MinkowskiKNNEdges
from graphnet.models.graphs.edges.minkowski import (
compute_minkowski_distance_mat,
)
Expand Down

0 comments on commit 3a34edb

Please sign in to comment.