Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
129 lines (111 loc) · 4.83 KB
/
Copy pathpyproject.toml
File metadata and controls
129 lines (111 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[build-system]
requires = ["hatchling>=1.27"] # PEP 639 license expression and license-files
build-backend = "hatchling.build"
[project]
name = "point-transformer-v3"
version = "0.1.2"
description = "Point Transformer V3 in pure PyTorch and Triton: runs the PTv3, Sonata, Concerto and Utonia weights."
readme = "README.md"
requires-python = ">=3.10"
# Code: CC BY-NC 4.0 with a research permission (NOTICE). Weights have their own licenses (NOTICE;
# PTv3 MIT, the encoders CC BY-NC 4.0) and are downloaded at runtime, not shipped.
license = "CC-BY-NC-4.0"
license-files = ["LICENSE", "NOTICE"]
authors = [{ name = "Pointcept", email = "xiaoyang.wu.cs@gmail.com" }]
keywords = ["point cloud", "transformer", "ptv3", "sonata", "concerto", "utonia", "3d"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"torch>=2.10", # torch.nn.attention.varlen (FlashAttention-2 in torch)
"numpy>=1.26",
"huggingface_hub>=0.25", # weight download (imported only when weights are fetched)
]
[project.optional-dependencies]
# Demos: open3d viewers (the demos also run headless without open3d).
demo = ["open3d>=0.19; python_version < '3.13'"]
[dependency-groups]
dev = ["pytest>=8.3", "ruff>=0.7", "pyright>=1.1.390"]
parity = ["safetensors>=0.4"] # tests/parity: reads processed ScanNet scenes (full-val mIoU)
# torch build for a source checkout with uv (not part of the published package): by default torch
# comes from PyPI (the CUDA 13 build on Linux x86_64, the CPU/MPS build on macOS). Pick at most one
# group to override it, e.g. `uv sync --group cu126`:
# cpu: CPU-only wheels (small; laptops, CI)
# cu126: CUDA 12.6 wheels (older drivers)
cpu = ["torch>=2.10"]
cu126 = ["torch>=2.10"]
[project.urls]
Homepage = "https://github.com/Pointcept/PointTransformerV3"
Repository = "https://github.com/Pointcept/PointTransformerV3"
Issues = "https://github.com/Pointcept/PointTransformerV3/issues"
[tool.hatch.build.targets.wheel]
# ships the package data too: ops/sparse_conv/THIRD_PARTY_LICENSES.md and triton_configs.json
packages = ["src/point_transformer_v3"]
[tool.hatch.build.targets.sdist]
include = ["/src/point_transformer_v3", "/README.md", "/LICENSE", "/NOTICE"]
[tool.uv]
# uv-managed CPython only: it ships Python.h, which Triton needs once to build its CUDA launcher
# helper; distro Pythons often lack the headers.
python-preference = "only-managed"
conflicts = [[{ group = "cpu" }, { group = "cu126" }]]
# The lock pins the torch release the parity tests and benchmarks ran on (the Triton kernels'
# launch configs were tuned there); bumping it reruns tests/parity and benchmarks/bench.py.
constraint-dependencies = ["torch==2.12.*"]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", group = "cpu" },
{ index = "pytorch-cu126", group = "cu126" },
]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src"]
[tool.ruff.format]
exclude = ["*.md"] # keep the aligned comments of the docs' code examples
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF", "TID251"]
ignore = ["E501"] # vendored docstrings keep their wrapping
[tool.ruff.lint.isort]
known-first-party = ["point_transformer_v3", "tests"]
[tool.ruff.lint.per-file-ignores]
# the parity dump runs in the original environment: it imports the original code, never this package
"tests/parity/dump_original.py" = ["TID251", "SIM118"]
"demo/*.py" = ["E402"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"addict".msg = "use point_transformer_v3.Point"
"timm".msg = "use point_transformer_v3.layers"
"torch_scatter".msg = "use point_transformer_v3.ops.pooling"
"spconv".msg = "use point_transformer_v3.ops.sparse_conv"
"flash_attn".msg = "use point_transformer_v3.ops.attention"
"pointcept2".msg = "vendor the code instead (this package is standalone)"
[tool.pyright]
venvPath = "."
venv = ".venv"
include = ["src"]
pythonVersion = "3.10"
typeCheckingMode = "basic"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-m 'not gpu and not weights and not parity and not data' -p no:cacheprovider"
markers = [
"gpu: needs a CUDA GPU (pytest -m gpu)",
"weights: downloads or reads the released checkpoints (pytest -m weights)",
"parity: compares against dumps of the original implementations (tests/parity/README.md)",
"data: needs processed ScanNet scenes (skipped in this package)",
]