diffusion-planner-p150 / pyproject.toml
changh95's picture
tt-model push diffusion-planner-p150 (container)
4d9b003 verified
Raw History Blame Contribute Delete
3.2 kB
# SPDX-License-Identifier: Apache-2.0
# Python package of diffusion-planner-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-diffusion-planner"
dynamic = ["version"] # tt_diffusion_planner.__version__, the version /openapi.json reports
description = "Diffusion Planner v5.0 (Autoware diffusion_planner) 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", # Autoware *.param.yaml
"huggingface_hub", # weights pointer: AutowareFoundation/diffusion_planner@423efde67f5414734da43a7ad856c17ceb8b51aa
"safetensors",
"onnx>=1.17,<2", # reads the ONNX initializers (data only)
]
[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/diffusion-planner-p150"
"Weights" = "https://huggingface.co/AutowareFoundation/diffusion_planner"
"Autoware package" = "https://github.com/autowarefoundation/autoware_universe/tree/9ceaccf026c31ffc5319bc9eeb4bd7bede0af3fd/planning/autoware_diffusion_planner"
[tool.setuptools.dynamic]
version = { attr = "tt_diffusion_planner.__version__" }
[tool.setuptools.packages.find]
where = ["code"] # import root (code/conftest.py and code/scripts/ are not packaged)
include = ["tt_diffusion_planner*"] # with the vendored tt_diffusion_planner.ttaw (common/tools/vendor.py; never edit it)
exclude = ["tt_diffusion_planner.tests*"]
[tool.setuptools.package-data]
"tt_diffusion_planner" = ["samples/*", "calib/*.json"]
"tt_diffusion_planner.tt" = ["kernels/*.cpp", "kernels/*.hpp", "kernels/*.h"]
"tt_diffusion_planner.ttaw" = ["API.md", "VENDORED.json"]
"tt_diffusion_planner.ttaw.ops" = ["kernels/*.cpp", "kernels/*.hpp", "kernels/*.h"]
[tool.pytest.ini_options]
markers = ["device: needs a Tenstorrent chip (skipped on host-only runs)"]