-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
241 lines (214 loc) · 4.87 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "fd_shifts"
dynamic = ["version"]
requires-python = ">=3.11"
dependencies = [
"albumentations>=1.0.3",
"deepdiff",
"faiss-cpu",
"hydra-colorlog>=1.1.0",
"hydra-core>=1.1.1",
"hydra-zen",
"imageio>=2.9.0",
"ipython",
"jsonargparse[signatures]>=4.29.0,<4.30.0",
"loguru",
"matplotlib>=3.3.4",
"medmnist",
"numpy>=1.22.2,<2.0.0",
"ogb>=1.3.1",
"omegaconf>=2.1.1",
"opencv-python-headless",
"pandarallel>=1.6.5",
"pandas>=1.2.3",
"Pillow>=9.5.0",
"protobuf<=3.20.0",
"pydantic>=1.10.0,<2.0.0",
"lightning-bolts==0.7.0",
"lightning==2.2.1",
"rich>=10.7.0",
"robustness @ https://github.com/MadryLab/robustness/archive/master.tar.gz",
"scikit-image>=0.18.2",
"scikit-learn>=0.24.2",
"scipy>=1.6.1",
"seaborn>=0.11.1",
"shtab",
"tensorboard>=2.4.1",
"timm>=0.5.4",
"toml>=0.10.2",
"torch>=2.0.0",
"torchmetrics>=0.2.0",
"torchvision>=0.12.0",
"tqdm>=4.62.0",
"typing_extensions>=4.1.1",
"wandb",
"warmup_scheduler",
"wilds>=1.1.0",
]
[project.optional-dependencies]
dev = [
"pytest",
"syrupy",
"nbdime",
"nbmake",
"pylint",
"black",
"debugpy",
"pre-commit",
]
docs = ["jupyterlab", "notebook", "ipykernel"]
launcher = ["parallel-ssh"]
[project.scripts]
fd-shifts = "fd_shifts.main:main"
[tool.setuptools_scm]
write_to = "fd_shifts/_version.py"
[tool.setuptools.packages]
find = {}
[tool.setuptools.package-data]
"*" = ["*.yaml"]
[tool.isort]
profile = "black"
[tool.black]
line-length = 88
exclude = '''
(
/(
\.git
| \.venv
| _build
)/
)
'''
[tool.pyright]
exclude = [
"experiments*",
"analysis_outputs",
]
reportOptionalSubscript = "warning"
reportOptionalMemberAccess = "warning"
reportOptionalCall = "warning"
reportOptionalIterable = "warning"
reportOptionalContextManager = "warning"
reportOptionalOperand = "warning"
# useLibraryCodeForTypes = false
[tool.pytest.ini_options]
testpaths = [ "fd_shifts" ]
addopts = [
"--import-mode=importlib",
]
xfail_strict = true
filterwarnings = [
'ignore:fields may not start with an underscore:RuntimeWarning',
# Ignore tensorboard deprecation warnings
'ignore:distutils:DeprecationWarning',
'ignore:Call to deprecated create function:DeprecationWarning',
# Ignore timm deprecation warnings
'ignore:.*is deprecated and will be removed in Pillow 10:DeprecationWarning',
'ignore:torch.distributed._sharded_tensor will be deprecated, use torch.distributed._shard.sharded_tensor instead:DeprecationWarning',
# Ignore lightning_bolts optional dependencies warnings
'ignore:You want to use:UserWarning',
]
markers = [
"baurc:selects all tests for this metric",
]
[tool.pylint]
extension-pkg-allow-list = [
"numpy",
"torch",
]
class-const-naming-style = "any"
load-plugins = ["pylint.extensions.docparams"]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style = "new"
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules = ["logging", "loguru"]
disable = [
"raw-checker-failed",
"bad-inline-option",
"locally-disabled",
"file-ignored",
"suppressed-message",
"useless-suppression",
"deprecated-pragma",
"use-symbolic-message-instead",
"missing-module-docstring",
]
max-args = 10
max-attributes = 20
ignore-paths = [
"fd_shifts/models/networks/residual_flows/*",
"fd_shifts/tests/*",
]
accept-no-param-doc = false
accept-no-raise-doc = false
accept-no-return-doc = false
accept-no-yields-doc = false
[tool.mypy]
# strict = true
plugins = [
"pydantic.mypy",
]
show_error_codes = true
show_column_numbers = true
follow_imports = "silent"
exclude = [
'fd_shifts/models/networks/residual_flows/.*',
'fd_shifts/tests/.*',
]
files = [
"fd_shifts",
]
python_version = "3.10"
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
strict_concatenate = true
[[tool.mypy.overrides]]
module = [
"albumentations.*",
"timm.*",
"tensorflow.*",
"tensorboard.*",
"matplotlib.*",
# "numpy.*",
"multiprocessing.*",
"torchvision.*",
"torch.*",
"scipy.*",
"IPython.*",
"skimage.*",
# "mypy.*",
"usort.*",
"sklearn.*",
"hydra_zen.*",
"hydra_zen",
"deepdiff.*",
"cv2.*",
"pl_bolts.*",
"seaborn",
"pssh.*",
"wilds.*",
"robustness.*",
]
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true