TOSA Adapter for Model Explorer

raw JSON →
0.1.0 verified Fri May 01 auth: no python

An adapter for ai-edge-model-explorer that adds support for TOSA (Tensor Operator Set Architecture) flatbuffer files. Version 0.1.0 is the latest, with initial support and bug fixes. Release cadence is irregular.

pip install tosa-adapter-model-explorer
error ModuleNotFoundError: No module named 'tosa_adapter_model_explorer'
cause Package not installed or installed under a different name.
fix
Run: pip install tosa-adapter-model-explorer
error ImportError: cannot import name 'TosaAdapter' from 'tosa_adapter_model_explorer'
cause Incorrect import path (e.g., using wrong package name).
fix
Use: from tosa_adapter_model_explorer import TosaAdapter
error TypeError: register_adapter() missing 1 required positional argument: 'adapter'
cause Calling register_adapter without passing an instance.
fix
Call: register_adapter(TosaAdapter())
breaking Requires Python >=3.10 and <3.13; incompatible with Python 3.13+.
fix Use Python 3.10, 3.11, or 3.12.
gotcha The adapter must be registered before any model loading; otherwise, TOSA files are not recognized.
fix Call register_adapter(TosaAdapter()) early in your application.
deprecated Version 0.1.0 is the first stable release; no deprecation warnings yet. However, the API is subject to change.
fix Pin your dependency to avoid unexpected breaking changes.

Register the TOSA adapter so that Model Explorer can visualize TOSA models.

from ai_edge_model_explorer import register_adapter
from tosa_adapter_model_explorer import TosaAdapter

register_adapter(TosaAdapter())

# Then use Model Explorer with TOSA files as usual