Skip to main content

ETRecord Adapter for Model Explorer

etrecord-adapter-model-explorer is the standalone Model Explorer adapter for ExecuTorch ETRecord files using the .etrecord or .bin extension.

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 stored as an .etrecord or .bin 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

Install the development dependencies with pip 25.1 or newer:

python -m pip install -e . --group dev \
  --find-links https://download.pytorch.org/whl/cpu/torch/

The dev group selects CPU-only PyTorch wheels on Linux and Windows, and the regular macOS wheel. The --find-links option supplies PyTorch's wheel location alongside your configured package index.

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

pytest

Metadata

Release files for etrecord-adapter-model-explorer 0.2.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.2.0
File Size Uploaded
etrecord_adapter_model_explorer-0.2.0.tar.gz 26.7 kB Details

Built distribution (wheel)

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

Total release size: 59.2 kB

Release files / etrecord_adapter_model_explorer-0.2.0.tar.gz

Download URL etrecord_adapter_model_explorer-0.2.0.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a37b02d6a47a9bd5bad6ed0f818595dfe83b2b9c2996e4fc308f21f161c717d5
BLAKE2b-256 checksum
How to use checksums
ffc6288ae2185b67a7de86f140d2ff791548b66e3ee6aa48dad363dc177ad84a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

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

Download URL etrecord_adapter_model_explorer-0.2.0-py3-none-any.whl
Size 32.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0233b894e3d54b55e5ded96409db274500b468848a93c0661d79f4fa3fca86e
BLAKE2b-256 checksum
How to use checksums
3fa8253e30430cbf890be9ef508b96d536fd6d30c2966791fa7977820763b99e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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