nat.profiler.prediction_trie.serialization#
Attributes#
Functions#
|
Save a prediction trie to a JSON file. |
|
Load a prediction trie from a JSON file. |
|
Serialize a trie node to a dictionary. |
|
Deserialize a dictionary to a trie node. |
Module Contents#
- CURRENT_VERSION = '1.0'#
- save_prediction_trie(
- trie: nat.profiler.prediction_trie.data_models.PredictionTrieNode,
- path: pathlib.Path,
- workflow_name: str = 'unknown',
Save a prediction trie to a JSON file.
- Args:
trie: The prediction trie root node path: Path to save the JSON file workflow_name: Name of the workflow this trie was built from
- load_prediction_trie(
- path: pathlib.Path,
Load a prediction trie from a JSON file.
- Args:
path: Path to the JSON file
- Returns:
The deserialized prediction trie root node
- _deserialize_node( ) nat.profiler.prediction_trie.data_models.PredictionTrieNode#
Deserialize a dictionary to a trie node.