flexeval.helpers#

Generic utility functions.

Functions

generate_hash()

Create a random 8-digit id

visualize_graph(graph[, output_path])

Visualize graphs produced by MetricGraphBuilder.

flexeval.helpers.generate_hash()[source]#

Create a random 8-digit id

flexeval.helpers.visualize_graph(graph: DiGraph, output_path: str | None = None)[source]#

Visualize graphs produced by MetricGraphBuilder.

Parameters:
  • graph (nx.DiGraph) – The graph

  • output_path (str | None, optional) – If not None, will save the graph as an image using matplotlib.pyplot.Figure.savefig().

Raises:

ImportError – If matplotlib is not installed.