Skip to main content

ETRecord Adapter for Model Explorer

etrecord-adapter-model-explorer is the standalone Model Explorer adapter for ExecuTorch .etrecord files.

This repository contains the ETRecord-specific adapter code, tests, and fixtures. For a combined install that wires the PTE adapter, ETRecord adapter, and ETDump data provider together, use the umbrella package executorch-extension-model-explorer.

Installation

Install the standalone adapter package:

pip install etrecord-adapter-model-explorer

The adapter expects an environment with the ExecuTorch Python packages available.

Usage

Run Model Explorer with the standalone ETRecord adapter enabled:

model-explorer --extensions=etrecord_adapter_model_explorer

Then open an .etrecord file.

Delegate visibility

Delegated ExecuTorch programs often collapse a backend-supported subgraph into an opaque executorch_call_delegate node. If an ETRecord is generated from the post-delegation edge graph, this adapter can only display that delegate call for the delegated region because the original edge operators are no longer present in the recorded edge graph.

To keep the original operators visible, generate the ETRecord with the pre-delegation EdgeProgramManager as edge_dialect_program and the delegated ExecutorchProgramManager as executorch_program:

import copy
import torch
from executorch.backends.arm import EthosUCompileSpec, EthosUPartitioner
from executorch.devtools import generate_etrecord
from executorch.exir import to_edge, to_edge_transform_and_lower

exported_program = torch.export.export(model.eval(), example_inputs)

edge_program = to_edge(exported_program)
edge_program_for_record = copy.deepcopy(edge_program)

compile_spec = EthosUCompileSpec("ethos-u55-128")
delegated_edge_program = to_edge_transform_and_lower(
    programs=exported_program,
    partitioner=[EthosUPartitioner(compile_spec)],
)
executorch_program = delegated_edge_program.to_executorch()

generate_etrecord(
    "model.etrecord",
    edge_dialect_program=edge_program_for_record,
    executorch_program=executorch_program,
)

Backends that emit delegate debug mapping can also let the adapter group those operators under a delegate namespace such as delegates/CoreMLBackend/partition_0. Backends that do not emit that mapping can still show the pre-delegation operators, but delegate grouping may be limited.

Development

Local ETRecord test fixtures live under src/etrecord_adapter_model_explorer/tests/fixtures/.

pytest

Metadata

Release files for etrecord-adapter-model-explorer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etrecord-adapter-model-explorer 0.1.0
File Size Uploaded
etrecord_adapter_model_explorer-0.1.0.tar.gz 21.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for etrecord-adapter-model-explorer 0.1.0
File Interpreter ABI Platform
etrecord_adapter_model_explorer-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.2 kB

Release files / etrecord_adapter_model_explorer-0.1.0.tar.gz

Download URL etrecord_adapter_model_explorer-0.1.0.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a47028c5a568890e95b0114f3cb13145069ba248d8848b7b3622dd02d5e22ed1
BLAKE2b-256 checksum
How to use checksums
f038bf67251a25327af2b62e2f9ad88cb4a0d16704d90832bb7191d5ec377587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release files / etrecord_adapter_model_explorer-0.1.0-py3-none-any.whl

Download URL etrecord_adapter_model_explorer-0.1.0-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50f01999d105c292cf47b46d24558067613527062deefc5caa9697ac4aa9562b
BLAKE2b-256 checksum
How to use checksums
d279ed954590d2610322cf5cf56d654c89b07c21e1f17fba0c9963e32824b04b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page