innovate.execute
All current Python definitions
View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
Signature
Section titled “Signature”def execute(operation: str, model: str | None=None, **payload: Any) -> dict[str, Any]: ...Execute a schema-2.0 request and retain the complete native response.
Use this low-level interface for operations that do not have a table wrapper. Payload fields are operation-specific and must obey the native contract; unsupported operations and model features fail rather than falling back. The wrapper adds the schema version and serializes the request. It does not infer time units, convert observations between levels and interval counts, sort arrays, or repair missing values.
Parameters
Section titled “Parameters”operation: Native operation name, such asdiscover_modelsorpredict_model.model: Native model key, such asbassorlogistic. Use the defaultNonefor operations that do not select a model.payload: JSON-compatible keyword fields placed in the request’spayloadobject. Use lists for arrays, including singletons, andNonefor JSON null. All numeric values must be finite; their units and allowed ranges follow the selected native operation.
Returns
Section titled “Returns”Decoded response envelope, including result and native metadata.
JSON objects become dictionaries, arrays become lists and null becomes
None. Successful envelopes may omit error. A non-null outer
native error is raised before return; errors stored inside batch or
scenario result rows remain available for the caller to inspect.
Raises
Section titled “Raises”NativeError: If the kernel rejects the request or cannot execute it.TypeError: If a payload value cannot be serialized as JSON.ValueError: If serialization encounters NaN, infinity or a circular object.
Examples
Section titled “Examples”import innovateresponse = innovate.execute("discover_models")assert response["schema_version"] == "2.0"assert response.get("error") is Noneassert "bass" in {model["key"] for model in response["result"]["models"]}