Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 18, 2024
1 parent 659652f commit f10810c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/anemoi/models/layers/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def register_fixed_attributes(self, graph_data: HeteroData) -> None:
self.nodes_names = list(graph_data.node_types)
self.num_nodes = {nodes_name: graph_data[nodes_name].num_nodes for nodes_name in self.nodes_names}
self.coord_dims = {nodes_name: 2 * graph_data[nodes_name].x.shape[1] for nodes_name in self.nodes_names}
self.attr_ndims = {nodes_name: self.coord_dims[nodes_name] + self.num_trainable_params for nodes_name in self.nodes_names}
self.attr_ndims = {
nodes_name: self.coord_dims[nodes_name] + self.num_trainable_params for nodes_name in self.nodes_names
}

def register_coordinates(self, name: str, node_coords: torch.Tensor) -> None:
"""Register coordinates."""
Expand Down

0 comments on commit f10810c

Please sign in to comment.