Function: inspectModel()
inspectModel(
source):Promise<ModelInspection>
Defined in: utils.ts:71
Inspects an ExecuTorch model file to fetch its metadata and signature info for all methods.
If a remote HTTP URL is provided, the utility downloads the model to a temporary local file, reads its configuration and method signatures (inputs/outputs shapes, types, and tags), and deletes the temporary file before returning.
That download is deliberately throwaway: it does not go through download, so the file never enters the persistent resource cache and is not reused. Inspecting a remote model therefore re-downloads it on every call and leaves nothing behind — call download first and inspect the returned local path if you also intend to run the model.
Parameters
source
string
The remote HTTP URL or local path to the .pte model file.
Returns
Promise<ModelInspection>
A promise resolving to an object containing the model source, method signature metadata, and per-method backend usage.