Skip to content

Commit

Permalink
Change defaulting behavior of GraphDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusOrsoe committed May 20, 2024
1 parent 2efd732 commit ba21461
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/graphnet/models/graphs/graph_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GraphDefinition(Model):
def __init__(
self,
detector: Detector,
node_definition: NodeDefinition = NodesAsPulses(),
node_definition: NodeDefinition = None,
edge_definition: Optional[EdgeDefinition] = None,
input_feature_names: Optional[List[str]] = None,
dtype: Optional[torch.dtype] = torch.float,
Expand Down Expand Up @@ -69,6 +69,9 @@ def __init__(
# Base class constructor
super().__init__(name=__name__, class_name=self.__class__.__name__)

if node_definition is None:
node_definition = NodesAsPulses()

# Member Variables
self._detector = detector
self._edge_definition = edge_definition
Expand Down

0 comments on commit ba21461

Please sign in to comment.