-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
175 lines (143 loc) · 3.78 KB
/
pyproject.toml
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[project]
name = "lab_exp_2023f"
version = "0.1.0"
description = ""
authors = [
{name = "Nasy", email = "[email protected]"},
]
dependencies = [
"tyro>=0.5.6",
"rich>=13.5.2",
"numpy>=1.25.2",
"scikit-image>=0.21.0",
"pillow>=10.0.0",
"types-pillow>=10.0.0.2",
"types-tqdm>=4.66.0.2",
"dm-haiku>=0.0.10",
"jax>=0.4.14",
"jaxlib>=0.4.14",
"jaxtyping>=0.2.21",
"optax @ git+https://github.com/deepmind/optax.git",
"flax>=0.7.4",
"clu>=0.0.9",
"orbax-checkpoint>=0.4.0",
"dm-pix>=0.4.1",
]
requires-python = ">=3.11,<3.12"
readme = {content-type = "text/plain", file="readme.org"}
license = {text = "MIT"}
[project.optional-dependencies]
cuda = [
"jax[cuda12_pip]>=0.4.18",
"jaxlib[cuda12_pip]>=0.4.18",
"nvidia-cudnn-cu12==8.9.4.25",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
[tool.pdm.build]
includes = ["src"]
package-dir = "src"
# [[tool.pdm.source]]
# url = "https://download.pytorch.org/whl/cu116"
# verify_ssl = true
# name = "torch"
[[tool.pdm.source]]
url = "https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
name = "jaxlib"
verify_ssl = true
type = "find_links"
[tool.pdm.dev-dependencies]
dev = [
"kaggle>=1.5.16",
"ipdb>=0.13.13",
]
[tool.mypy]
mypy_path = "./typings"
exclude = [
"__pypackages__/",
"./typings", # for pyright autogen stubs
]
follow_imports_for_stubs = true
follow_imports = "silent"
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false
implicit_optional = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = false
warn_return_any = false
warn_unreachable = true
ignore_errors = false
allow_untyped_globals = false
allow_redefinition = false
local_partial_types = false
implicit_reexport = true
strict_equality = true
strict = true
warn_unused_configs = true
[tool.pyright]
pythonVersion = "3.11"
extraPaths = [
"__pypackages__/3.9/lib",
"__pypackages__/3.10/lib",
"__pypackages__/3.11/lib",
"__pypackages__/3.12/lib",
"src",
]
exclude = [
"**/__pycache__",
]
useLibraryCodeForTypes = true
[tool.ruff]
exclude = [ "__types" ]
fix = false
unfixable = ["F401", "F841", "C417"]
format = "grouped"
# show-source = true
select = ["ALL"]
ignore = [
"ANN101", "C417", "COM812", "D203", "D213", "E401",
"FBT002", "EM102", "ERA001", "EXE001", "FBT001",
"I001", "PD", "S101", "SLF001", "TRY003", "UP009",
"EM101", "T201", "PGH003"
]
# show-fixes = true
[tool.ruff.isort]
section-order = ["future", "standard-library", "first-party", "tf", "torch", "jax", "types", "math", "database", "third-party", "config", "local-folder"]
[tool.ruff.isort.sections]
database = ["lucene", "lupyne", "elasticsearch", "sqlite", "shelve"]
tf = ["tensorflow", "keras"]
torch = ["torch", "torchdata", "torchvision", "pytorch_lightning"]
jax = ["jax", "haiku", "flax", "optax", "jraph", "chex", "jaxopt"]
types = ["typing", "types", "jax.typing", "jaxtyping", "numpy.typing", "typing_extensions"]
math = ["numpy", "scipy", "sklearn", "pandas"]
config = ["config", "settings", "cfg", "smile_config", "tyro"]
[tool.ruff.per-file-ignores]
"__init__.py" = [ "D104" ]
"__version__.py" = [ "D100" ]
"sites/*.py" = [ "INP001" ]
[tool.ruff.pylint]
max-args = 10
[tool.ruff.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 15.
max-complexity = 15
[tool.pyink]
pyink_indentation = 2
preview = true
[tool.yapf]
based_on_style = "yapf"
column_limit = 88
allow_multiline_lambdas = true
split_before_arithmetic_operator = true