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.

Requirements

  • Python >=3.10, <3.15

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.1

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.1
File Size Uploaded Provenance Actions
etrecord_adapter_model_explorer-0.2.1.tar.gz 26.8 kB With provenance Details for etrecord_adapter_model_explorer-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 59.4 kB

Release files / etrecord_adapter_model_explorer-0.2.1.tar.gz

Download URL etrecord_adapter_model_explorer-0.2.1.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
99ffc7ff1bd8deb8c3b5bb027f151eef0475af1e4eca5c6fa28a731c6be8e0e0
BLAKE2b-256 checksum
How to use checksums
359032bff76fc3c507c5f268e55f2108c0a9d5f8eebdcba5b3cf4ff22ec0d026
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 Nov 5, 2026.

Transparency log

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

Download URL etrecord_adapter_model_explorer-0.2.1-py3-none-any.whl
Size 32.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c73f3eda4b5a7927c3d90711d0fd305fe6b15948f2401fde9e2b32c98d602aed
BLAKE2b-256 checksum
How to use checksums
6e3415afddf3809b0d6d485967066e4353be6ac08d106ac0bf6b0368a6e312f7
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 Nov 5, 2026.

Transparency log

Security for etrecord-adapter-model-explorer 0.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for etrecord_adapter_model_explorer-0.2.1.tar.gz

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 Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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