lapspython.utils

Utility functions that do not fit in other modules.

Functions

load_checkpoint(filename)

Load training checkpoint.

json_read(filename)

Read grammar and results from json file.

json_dump(filename, grammar, result)

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
lapspython.utils.json_read(filename: str) dict[source]

Read grammar and results from json file.

Parameters

filename (str) – File name in checkpoints folder without file extension.

Returns

{grammar, result} dictionary

Rytpe

dict