meteor-p150 / pyproject.toml
changh95's picture
tt-model push meteor-p150 (container)
51defdc verified
Raw History Blame
3.14 kB
# SPDX-License-Identifier: Apache-2.0
# Python package of meteor-p150, from the ROOT of the model repo:
# pip install -e . # the Python API
# pip install -e ".[server,test]" # + the HTTP server and the tests
#
# Install it into an environment that already has tt-metal's ttnn (and its torch 2.11.0+cpu): ttnn and torch are
# NOT declared, so pip never replaces the tt-metal build's own torch. The container image installs the same set
# through tt-model.yaml runtime.packages.
#
# This file lives at the repo root ON PURPOSE and must never move into code/: tt-model copies code/ over /opt/tt-metal
# right before `uv pip install -e /opt/tt-metal` in the image build, so a code/pyproject.toml would replace tt-metal's
# own (project ttnn) and break `import ttnn` in the image (research/PACKAGING_PILOT.md problem 1;
# research/packaging/scripts/check_bundle.py refuses it). It is not in tt-model.yaml extra_code: it reaches the Hub as
# an overlay file next to README.md (SERVING.md section 2), like the other top-level docs.
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "tt-meteor"
dynamic = ["version"] # tt_meteor.__version__, the version /openapi.json reports
description = "METEOR (TIER IV, AutowareFoundation/meteor) on Tenstorrent Blackhole p150 (tt-nn), with a Python API and an HTTP server"
readme = "code/PYTHON.md"
license = "Apache-2.0"
requires-python = ">=3.10"
dependencies = [
"numpy>=1.24.4,<2", # ttnn needs numpy 1.x
"pillow",
"pyyaml", # meteor_v157.param.yaml
"huggingface_hub", # weights pointer: AutowareFoundation/meteor@01a5f6d71df5ecbbb5853ec600825481d57b9c6b
"safetensors",
"onnx>=1.17,<2", # reads the ONNX initializers (data only)
"opencv-python-headless>=4.8,<4.12", # host post-processing (seg-fusion warp, rotated NMS); tt-metal's env has 4.8.1
]
[project.optional-dependencies]
server = ["fastapi", "uvicorn", "pydantic>=2"]
test = ["pytest", "httpx"]
reference = ["onnxruntime"] # ONNX Runtime golden (research / tests only, not in the image)
[project.urls]
"Model card" = "https://huggingface.co/changh95/meteor-p150"
"Weights" = "https://huggingface.co/AutowareFoundation/meteor"
"METEOR runtime (no Autoware package)" = "https://github.com/tier4/METEOR/tree/dc193a81e9959de57b751e269127ae9b67e3f300/deploy/cpp"
[tool.setuptools.dynamic]
version = { attr = "tt_meteor.__version__" }
[tool.setuptools.packages.find]
where = ["code"] # import root (code/conftest.py and code/scripts/ are not packaged)
include = ["tt_meteor*"] # with the vendored tt_meteor.ttaw (common/tools/vendor.py; never edit it)
exclude = ["tt_meteor.tests*"]
[tool.setuptools.package-data]
"tt_meteor" = ["samples/*", "samples/*/*", "calib/*.json"]
"tt_meteor.tt" = ["kernels/*.cpp", "kernels/*.hpp", "kernels/*.h"]
"tt_meteor.ttaw" = ["API.md", "VENDORED.json"]
"tt_meteor.ttaw.ops" = ["kernels/*.cpp", "kernels/*.hpp", "kernels/*.h"]
[tool.pytest.ini_options]
markers = ["device: needs a Tenstorrent chip (skipped on host-only runs)"]