laya / pyproject.toml
changh95's picture
tt-model push laya (container)
f882f26 verified
Raw History Blame Contribute Delete
2.14 kB
# SPDX-License-Identifier: Apache-2.0
# Python package of laya on Tenstorrent p150 (changh95/laya), 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 (pinned there to the versions the tests ran with).
#
# This file lives at the repo root ON PURPOSE and must never move into code/ (tt-model copies code/ over /opt/tt-metal
# before the ttnn install in the image build; a code/pyproject.toml would replace tt-metal's own).
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "tt-laya"
dynamic = ["version"]
description = "laya typed decisions with calibrated probabilities (convaiinnovations/laya classic checkpoints) on Tenstorrent Blackhole p150 (one megakernel), with a Python API and a laya-serve compatible HTTP server"
readme = "code/PYTHON.md"
license = "Apache-2.0"
requires-python = ">=3.10"
dependencies = [
"numpy>=1.24.4,<2",
"safetensors",
"huggingface_hub",
"tokenizers",
]
[project.optional-dependencies]
server = ["fastapi", "uvicorn", "pydantic>=2", "orjson"]
test = ["pytest", "httpx"]
[project.urls]
"Model card" = "https://huggingface.co/changh95/laya"
"Weights" = "https://huggingface.co/convaiinnovations/laya"
[tool.setuptools.dynamic]
version = { attr = "tt_laya.__version__" }
[tool.setuptools.packages.find]
where = ["code"]
include = ["tt_laya*"]
exclude = ["tt_laya.tests*"]
[tool.setuptools.package-data]
"tt_laya" = ["samples/*", "licenses/*"]
"tt_laya.tt.mk" = ["kernels/*.cpp", "kernels/*.hpp"] # device kernels, JIT-compiled at start
"tt_laya.ttaw" = ["API.md", "VENDORED.json"]
"tt_laya.ttaw.ops" = ["kernels/*.cpp", "kernels/*.hpp", "kernels/*.h"]
[tool.pytest.ini_options]
markers = ["device: needs a Tenstorrent chip (skipped on host-only runs)"]