-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (144 loc) · 4.18 KB
/
pyproject.toml
File metadata and controls
160 lines (144 loc) · 4.18 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[project]
name = "quantized-containerized-models"
version = "0.3.0"
description = "Deploy AI models in reproducible, containerized environments using Cog — scalable, hardware-efficient inference with quantized models."
authors = [{ name = "Parag Ekbote", email = "paragekbote23@gmail.com" }]
readme = "README.md"
license = { text = "Apache 2.0" }
requires-python = ">=3.12"
# ===== Core Dependencies =====
dependencies = [
"torch>=2.7.0",
"torchvision>=0.22.0",
"torchaudio>=2.7.0",
"cog>=0.9.3",
"replicate==1.0.7"
]
# ===== Optional Dependency Groups =====
[project.optional-dependencies]
smollm3-3b-smashed= [
"colorama",
"IPython",
"pyarrow<18",
"pruna==0.2.8",
]
phi-4-reasoning-plus-unsloth = [
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu12torch2.8cxx11abiTRUE-cp312-cp312-linux_x86_64.whl",
"torch==2.8.0",
"torchvision==0.23.0",
"torchaudio==2.8.0",
"transformers",
"accelerate",
"unsloth",
"unsloth_zoo"
]
flux-fast-lora-img2img = [
"pillow>=11.3.0",
"transformers>=4.52.0",
"accelerate>=1.8.0",
"diffusers>=0.33.0",
"bitsandbytes>=0.45.0",
"python-dotenv==1.1.1",
"peft>=0.15.0",
"sentencepiece>=0.1.95",
"protobuf>=3.20.0"
]
flux-fast-lora = [
"pillow>=11.3.0",
"transformers>=4.52.0",
"accelerate>=1.8.0",
"diffusers>=0.33.0",
"python-dotenv==1.1.1",
"bitsandbytes>=0.45.0",
"kernels>=0.10.0",
"peft>=0.15.0",
"sentencepiece>=0.1.95",
"protobuf>=3.20.0",
]
gemma3-torchao-quant-sparse = [
"pillow>=11.3.0",
"transformers>=4.52.0",
"accelerate>=1.8.0",
"bitsandbytes>=0.45.0",
"sentencepiece>=0.1.95",
"python-dotenv==1.1.1",
"protobuf>=3.20.0",
"requests>=2.31.0",
"torchvision",
"torchao",
]
dev = [
"pre-commit",
"ty==0.0.1a20",
"ruff>0.14.0",
]
unit = [
"quantized-containerized-models[smollm3,flux-fast-lora,flux-fast-lora-img2img,gemma-torchao,tests]"
]
tests = [
"pytest>8.0",
"replicate==1.0.7",
"cog>=0.9.3",
"timm",
"tenacity",
"imagehash",
"sentence-transformers",
"httpx",
]
canary = [
"quantized-containerized-models[tests]"
]
integration = ["quantized-containerized-models[tests]"]
docs= [
"mkdocs-material==9.6.0"
]
# ===== Pytest =====
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra -q"
testpaths = ["tests"]
pythonpath = ["src"]
markers = [
"unit: fast contract tests",
"integration: tests requiring Replicate API",
"deployment: tests verifying container build",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::UserWarning",
]
# ===== Ruff Linting & Formatting =====
[tool.ruff]
line-length = 150
target-version = "py310"
fix = true
show-fixes = true
lint.ignore = ["E203","B017","F811","E731","F811"]
lint.select = ["E", "F", "I", "B", "UP"]
exclude = ["__pycache__", "build", "dist",".venv"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
docstring-code-format = true
# -----------------------------
# Type checker configuration
# -----------------------------
[tool.ty.rules]
# Ignore rules that are stricter than mypy for transition period
unresolved-import = "ignore"
invalid-assignment = "ignore" # mypy is more permissive with Any assignments
call-non-callable = "ignore" # mypy allows more dynamic method calls
index-out-of-bounds = "ignore" # mypy is more permissive with tuple indexing
unresolved-attribute = "ignore" # mypy is more permissive with module attributes
redundant-cast = "ignore" # mypy doesn't warn about redundant casts
unsupported-operator = "ignore" # mypy supports | syntax with from __future__ import annotations
invalid-argument-type = "ignore" # mypy is more permissive with argument types
invalid-return-type = "ignore" # mypy is more permissive with return types
invalid-parameter-default = "ignore" # mypy is more permissive with parameter defaults
no-matching-overload = "ignore" # mypy is more permissive with overloads
unresolved-reference = "ignore" # mypy is more permissive with references
possibly-unbound-import = "ignore"
invalid-type-form="ignore"
invalid-method-override="ignore"
missing-argument = "ignore"