chore: upgrade dependencies

This commit is contained in:
Jianqi Pan
2024-11-25 20:30:08 +09:00
parent 447ad99aea
commit 253c87af8e
8 changed files with 1546 additions and 1572 deletions

View File

@@ -1,35 +1,69 @@
[tool.poetry]
[project]
name = "wdtagger"
version = "0.10.2"
description = ""
authors = ["Jianqi Pan <jannchie@gmail.com>"]
authors = [{ name = "Jianqi Pan", email = "jannchie@gmail.com" }]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
pillow = ">=10.3.0,<12.0.0"
pandas = "^2.2.2"
huggingface-hub = "^0.23.3"
rich = "^13.7.1"
onnxruntime-gpu = "^1.18.0"
requires-python = ">=3.10"
dependencies = [
"huggingface-hub>=0.26.2",
"numpy>=2.1.3",
"pandas>=2.2.3",
"pillow>=11.0.0",
"rich>=13.9.4",
]
[dependency-groups]
dev = ["pytest>=8.3.3", "pytest-benchmark>=5.1.0", "ruff>=0.8.0"]
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
pytest-benchmark = "^4.0.0"
ruff = "^0.5.5"
isort = "^5.13.2"
black = "^24.4.2"
mypy = "^1.11.0"
[project.optional-dependencies]
cpu = ["torch>=2.5.1", "torchvision>=0.20.1", "timm>=1.0.11"]
gpu = ["torch>=2.5.1", "torchvision>=0.20.1", "timm>=1.0.11"]
[tool.isort]
profile = "black"
[tool.ruff]
line-length = 140
select = ["ALL"]
[tool.black]
line-length = 120
ignore = [
"PGH",
"RUF003",
"BLE001",
"ERA001",
"FIX002",
"TD002",
"TD003",
"D",
"N812",
]
[tool.mypy]
ignore_missing_imports = true
[tool.pyright]
[tool.uv]
conflicts = [[{ extra = "cpu" }, { extra = "gpu" }]]
package = true
[tool.uv.sources]
torch = [
{ index = "torch-cpu", extra = "cpu" },
{ index = "torch-gpu", extra = "gpu" },
]
torchvision = [
{ index = "torch-cpu", extra = "cpu" },
{ index = "torch-gpu", extra = "gpu" },
]
[[tool.uv.index]]
name = "torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "torch-gpu"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"