Newer
Older
TIASJudgeModel / pyproject.toml
[project]
name = "tias-judge-model"
version = "0.1.0"
description = "舌画像から舌色 5 分類を推定する機械学習モデル(TIASjudge 用)"
readme = "README.md"
requires-python = ">=3.12,<3.13"
dependencies = [
    "torch>=2.5",
    "torchvision>=0.20",
    "timm>=1.0",
    "numpy>=2.0",
    "pillow>=11.0",
    "scikit-learn>=1.5",
    "matplotlib>=3.9",
    "pydantic>=2.9",
    "pyyaml>=6.0",
    "onnxruntime>=1.30.0",
    "opencv-python-headless>=5.0.0.93",
]

[project.scripts]
tias-dataset = "tias_judge_model.cli.dataset:main"
tias-remote = "tias_judge_model.cli.remote:main"
tias-seg = "tias_judge_model.cli.seg:main"
tias-train = "tias_judge_model.cli.train:main"

[dependency-groups]
dev = [
    "onnx>=1.23.0",
    "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'" }]

[[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/ はテンプレート所有のファイル(フック・テンプレートのテスト)であり,
# このプロジェクトの規約で整形しないため lint 対象から外す
extend-exclude = [".claude"]

[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\" で除外する)",
]