[project]
name = "tongue-seg-model"
version = "0.1.0"
description = "舌セグメンテーションモデル(ResUNet)の学習コード"
readme = "README.md"
requires-python = ">=3.12,<3.13"
dependencies = [
"torch>=2.5",
"torchvision>=0.20",
"numpy>=2.0",
"opencv-python-headless>=5.0.0.93",
"matplotlib>=3.9",
"pydantic>=2.9",
"pyyaml>=6.0",
"onnx>=1.23.0",
"onnxruntime>=1.30.0",
"tiasdata",
]
[dependency-groups]
dev = [
"pytest>=8.0",
"ruff>=0.8",
]
# Linux(Newton・Archimedes)では torch を PyTorch 公式の CUDA 12.6 版から取る.
# Archimedes のドライバ(535・CUDA 12.2 まで)では PyPI の既定(CUDA 13 版)が動かないため.
# 両サーバで同じビルドにそろう利点もある.Windows(手元)は PyPI の CPU 版のまま(ENV_01).
[tool.uv.sources]
torch = [{ index = "pytorch-cu126", marker = "sys_platform == 'linux'" }]
torchvision = [{ index = "pytorch-cu126", marker = "sys_platform == 'linux'" }]
tiasdata = { path = "external/TIASDataHub", editable = true }
[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true
[build-system]
requires = ["uv_build>=0.12.5,<0.13"]
build-backend = "uv_build"
[tool.ruff]
line-length = 100
target-version = "py312"
# .claude/ はテンプレート所有のファイル,external/ はサブモジュール(別リポジトリ),
# legacy/ は原本(書き換えない.PLAN_01 の R1)のため lint・整形の対象から外す.
extend-exclude = [".claude", "external", "legacy"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "N"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"slow: 学習を回す等の実行時間が長いテスト(通常実行では -m \"not slow\" で除外する)",
]