-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathpyproject.toml
More file actions
123 lines (108 loc) · 2.71 KB
/
pyproject.toml
File metadata and controls
123 lines (108 loc) · 2.71 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
[project]
name = "kiji-proxy"
version = "0.5.0"
description = "Kiji Privacy Proxy for PII Detection and Masking"
readme = "README.md"
requires-python = ">=3.13"
license = {text = "Apache 2.0"}
authors = [
]
# Minimal production dependencies - only what's absolutely necessary
dependencies = [
# Core ML/NLP dependencies (essential for PII detection)
"torch>=1.9.0",
"transformers>=4.20.0,<4.52.0",
"protobuf>=3.20.0",
"sentencepiece>=0.1.99",
"numpy>=1.21.0",
# FastAPI server dependencies (essential for API)
"fastapi>=0.104.0",
"uvicorn[standard]>=0.24.0",
"pydantic>=2.0.0",
"python-multipart>=0.0.6",
# HTTP client for testing (lightweight)
"requests>=2.28.0",
# misc
"absl-py>=2.3.1",
"httpx>=0.28.1",
"huggingface-hub>=0.35.3",
"datasets>=2.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=6.0",
"ruff>=0.1.0",
]
# Training dependencies (not needed in production)
training = [
"wandb>=0.12.0",
"datasets>=2.0.0",
"scikit-learn>=1.0.0",
"pytorch-crf>=0.7.2",
"seqeval>=1.2.2",
"tqdm>=4.64.0",
"psutil>=5.8.0",
"accelerate>=0.26.0",
"scipy>=1.0.0",
"pandas>=1.0.0",
"sympy>=1.0.0",
"metaflow>=2.12.0",
"metaflow-checkpoint>=0.1.0",
]
# ONNX quantization dependencies
quantization = [
"optimum[onnxruntime]>=1.15.0",
"onnx>=1.15.0",
"onnxruntime>=1.16.0",
"onnxscript>=0.1.0", # Required by torch.onnx.export
"ml_dtypes>=0.5.0",
]
# Model signing and verification
signing = [
"model-signing>=1.1.1",
]
# Label Studio dependencies
labelstudio = [
"Label-studio==1.22.0",
]
# All optional dependencies combined
all = [
"kiji-proxy[dev,training,quantization,signing,labelstudio]",
]
[project.urls]
Homepage = "https://github.com/dataiku/kiji-proxy"
Repository = "https://github.com/dataiku/kiji-proxy"
Documentation = "https://github.com/dataiku/kiji-proxy/blob/main/README.md"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
[tool.hatch.build.targets.wheel]
packages = ["model"]
exclude = [
"model/__pycache__",
"*.pyc",
]
[tool.ruff]
target-version = "py313"
line-length = 88
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.lint.isort]
known-first-party = ["model"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"