Jsonnet Rendering¶
Thin wrapper over the _jsonnet C bindings. TLAs are JSON-serialized
via json.dumps so jsonnet receives real typed values — ints stay
ints, bools stay bools, None becomes jsonnet null. The binding
is imported lazily inside
render so this module stays
safe to import on login nodes without _jsonnet installed.
graphids.config.jsonnet¶
jsonnet ¶
Jsonnet config rendering via the _jsonnet C bindings.
Evaluates a .jsonnet file with top-level arguments and returns the
parsed JSON as a dict. TLAs are passed through tla_codes so jsonnet
receives real typed values (ints stay ints, bools stay bools, None
becomes jsonnet null).
No torch dep, no package-level side effects — safe to import on login
nodes even without _jsonnet installed (the C binding is imported
lazily inside render).
JsonnetError ¶
Bases: RuntimeError
Raised when jsonnet evaluation fails.
render ¶
Render a .jsonnet file with top-level arguments.
TLAs are JSON-serialized via json.dumps so jsonnet receives real
typed values (ints stay ints, bools stay bools, None → jsonnet null).
Raises JsonnetError on evaluation failure or non-object output.