Graph Inspector

This module is used to inspect graphs. This inspection includes:

  • Distribution plots of node & edge attributes.

  • Interactive plot of each subgraph.

  • Interactive plot of isolated nodes.

  • Description of the graph in the console.

class anemoi.graphs.inspect.GraphInspector(path: str | Path, output_path: Path, show_attribute_distributions: bool | None = True, show_nodes: bool | None = False, **kwargs)

Bases: object

Inspect the graph.

path

Path to the graph file.

Type:

Union[str, Path]

output_path

Path to the output directory where the plots will be saved.

Type:

Path

show_attribute_distributions

Whether to show the distribution of the node and edge attributes.

Type:

Optional[bool]

show_nodes

Whether to show the interactive plots of the nodes.

Type:

Optional[bool]

inspect()

Run all the inspector methods.