stgraph.utils package

Submodules

stgraph.utils.constants module

Constants to be used across the project.

class stgraph.utils.constants.SizeConstants(value)[source]

Bases: Enum

Data Size Related Constants.

Constant

Value

Description

NODE_NORM_SIZE

2

Length of the node-wise normalization tensor

NODE_NORM_SIZE = 2

stgraph.utils.data_table module

Table that can display benchmarking data and other info.

class stgraph.utils.data_table.DataTable(title: str, col_name_list: list[str])[source]

Bases: object

Table that can display benchmarking data and other info.

This class provides functionality to create and display tables for benchmarking data along with other relevant information.

Example

from stgraph.utils import DataTable

table = DataTable(
    title = "GCN Benchmark Data",
    col_name_list = ["Model", "Time", "MSE"]
)

table.add_row("GCN", 12.56, 45.89)
table.add_row("GCN", 23.34, 44.32)

table.display()
Parameters:
  • title (str) – The title of the table

  • col_name_list (list[str]) – A list of the table column names

title

The title of the table

Type:

str

col_name_list

A list of the table column names

Type:

list[str]

add_row(values: list) None[source]

Add a row of data to the table.

Parameters:

values (list) – A list of values for each column in the row.

display(output_file: IO[str] | None = None) None[source]

Display entire table with data.

Parameters:

output_file (Optional[IO[str]], optional) – File object to write the table to.

Module contents

Utility package for STGraph.