The load_json app loads JSON serialised cogent3 objects from a file, returning whatever was stored.
In the writing JSON section, we wrote a likelihood function object to disk in JSON serialised format, now let’s load it back! All we need is the path to which it was written. Since write_json writes to a data store, this will be <path_to_dstore>/<identifier>.
Tip
To follow along with this example, first head to the writing JSON section to write out this data, or replace the path with a JSON file on your machine.
from cogent3 import get_appload_json_app = get_app("load_json")lf = load_json_app(f"{path_to_dstore}/gn_params.json")lf