meteor-p150 / code /tt_meteor /__init__.py
changh95's picture
tt-model push meteor-p150 (container)
51defdc verified
Raw History Blame Contribute Delete
1.42 kB
# SPDX-License-Identifier: Apache-2.0
"""METEOR (TIER IV, AutowareFoundation/meteor) on a Tenstorrent Blackhole p150 (tt-nn), packaged as changh95/meteor-p150.
Python API (see PYTHON.md)::
from tt_meteor import METEOR, load_sample
with METEOR.from_pretrained(device_id=0) as model:
out = model(**load_sample("code/tt_meteor/samples/synthetic_8cam.json"))
Importing the package has no side effects (no device, no ttnn / torch import, no network); the names below load
on first use. The HTTP server is ``tt_meteor.server.app:app`` (SERVING.md). ``tt_meteor.ttaw`` is the
vendored shared package of the Autoware ports (``ttaw/VENDORED.json`` records its version and file hashes; never
edit it here).
"""
__version__ = "0.1.0"
__all__ = ["METEOR", "Output", "open_device", "load_points", "load_image", "load_sample", "__version__"]
_LAZY = {
"METEOR": (".api", "METEOR"),
"Output": (".api", "Output"),
"open_device": (".device", "open_device"),
"load_points": (".io", "load_points"),
"load_image": (".io", "load_image"),
"load_sample": (".api", "load_sample"),
}
def __getattr__(name):
if name in _LAZY:
import importlib
module, attr = _LAZY[name]
return getattr(importlib.import_module(module, __name__), attr)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
def __dir__():
return sorted(list(globals()) + __all__)