lapspython.utils
Utility functions that do not fit in other modules.
Functions
|
Load training checkpoint. |
|
Read grammar and results from json file. |
|
Store grammar and best results in json file. |
- lapspython.utils.load_checkpoint(filename: str) dreamcoder.dreamcoder.ECResult[source]
Load training checkpoint.
- Parameters
filename (string) – Name of file in checkpoints directory, without extension
- Returns
dreamcoder.dreamcoder.ECResult
- lapspython.utils.json_dump(filename: str, grammar: lapspython.types.ParsedGrammar, result: lapspython.types.CompactResult) None[source]
Store grammar and best results in json file.
- Parameters
filename (str) – File name in checkpoints folder without file extension.
grammar (lapspython.types.ParsedGrammar) – Grammar extracted and parsed from checkpoint.
result (lapspython.types.CompactResult) – Result extracted and translated from checkpoint.