cayleypy.models.graph_hash

cayleypy.models.graph_hash(graph_def: CayleyGraphDef) → str[source]

Computes hash of the mathematical definition of a graph.

Only data affecting mathematical properties of the graph is hashed: type of generators, the generators themselves, and the central state. Names of the graph and of its generators are deliberately not hashed, so renaming a graph does not invalidate checkpoints of models trained for it.

Parameters:

graph_def – Definition of the graph.

Returns:

Hexadecimal sha256 hash of the definition.