-
Notifications
You must be signed in to change notification settings - Fork 286
/
pyproject.toml
349 lines (327 loc) · 11 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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
[build-system]
requires = [
"setuptools>=21",
"setuptools-scm"
]
build-backend = "setuptools.build_meta"
[project]
name="lightly"
requires-python = ">=3.6"
authors = [
{name = "Lightly Team", email = "[email protected]"},
]
license = {file = "LICENSE.txt"}
description="A deep learning package for self-supervised learning"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"certifi>=14.05.14",
"hydra-core>=1.0.0",
"lightly_utils~=0.0.0",
"numpy>=1.18.1",
"python_dateutil>=2.5.3",
"requests>=2.23.0",
"six>=1.10",
"tqdm>=4.44",
"torch",
"torchvision",
"pydantic>=1.10.5",
"pytorch_lightning>=1.0.4",
"urllib3>=1.25.3",
"aenum>=3.1.11"
]
dynamic = ["version", "readme"]
[project.optional-dependencies]
all = [
"lightly[dev,matplotlib,minimal,timm,video]"
]
dev = [
"sphinx",
"pylint",
"pytest",
"pytest-forked",
"pytest-xdist",
"pytest-mock",
"responses",
"docutils<=0.16",
"sphinx-copybutton",
"sphinx-design",
"sphinx-gallery",
"sphinx-tabs",
"sphinx-reredirects",
"sphinx_rtd_theme",
"matplotlib",
"pre-commit",
"opencv-python",
"scikit-learn",
"pandas",
"toml",
"torchmetrics",
# black, isort and mypy should be the same version as defined in .pre-commit-config.yaml
"black==23.1.0", # frozen version to avoid differences between CI and local dev machines
"isort==5.11.5", # frozen version to avoid differences between CI and local dev machines
"mypy==1.4.1", # frozen version to avoid differences between CI and local dev machines
"types-python-dateutil",
"types-toml",
"nbformat",
"jupytext"
]
# Minimal dependencies against which we test. Older versions might work depending on the
# functionality used.
minimal = [
"torch>=1.10.0",
"torchvision>=0.11.0",
"pytorch_lightning>=1.6",
]
openapi = [
"python_dateutil>=2.5.3",
"setuptools>=21.0.0",
"urllib3>=1.25.3",
"pydantic>=1.10.5",
"aenum>=3.1.11"
]
timm = ["timm>=0.9.9"]
video = ["av>=8.0.3"]
matplotlib = ["matplotlib>=3"]
[project.urls]
"Homepage" = "https://www.lightly.ai"
"Web-App" = "https://app.lightly.ai"
"Documentation" = "https://docs.lightly.ai"
"Github" = "https://github.com/lightly-ai/lightly"
"Discord" = "https://discord.gg/xvNJW94"
[project.scripts]
lightly-crop = "lightly.cli.crop_cli:entry"
lightly-download = "lightly.cli.download_cli:entry"
lightly-embed = "lightly.cli.embed_cli:entry"
lightly-magic = "lightly.cli.lightly_cli:entry"
lightly-serve = "lightly.cli.serve_cli:entry"
lightly-train = "lightly.cli.train_cli:entry"
lightly-version = "lightly.cli.version_cli:entry"
[tool.setuptools.packages.find]
include = ["lightly*"]
[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
version = {attr = "lightly.__version__"}
[tool.setuptools.package-data]
lightly = ["lightly/cli/config/*.yaml"]
[tool.black]
extend-exclude = "lightly/openapi_generated/.*"
[tool.isort]
profile = "black"
extend_skip = "lightly/openapi_generated"
[tool.coverage.run]
omit = ["lightly/openapi_generated/*"]
[tool.mypy]
ignore_missing_imports = true
warn_unused_configs = true
strict_equality = true
# Disallow dynamic typing
disallow_any_decorated = true
# TODO(Philipp, 09/23): Remove me!
# disallow_any_explicit = True
disallow_any_generics = true
disallow_subclassing_any = true
# Disallow untyped definitions
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
# None and optional handling
no_implicit_optional = true
strict_optional = true
# Configuring warnings
warn_unused_ignores = false # Different ignores are required for different Python versions
warn_no_return = true
warn_return_any = true
warn_redundant_casts = true
warn_unreachable = true
# Print format
show_error_codes = true
show_error_context = true
# Plugins
plugins = ["numpy.typing.mypy_plugin"]
# Excludes
# TODO(Philipp, 09/23): Remove these one by one (start with 300 files).
exclude = '''(?x)(
lightly/cli/version_cli.py |
lightly/cli/crop_cli.py |
lightly/cli/serve_cli.py |
lightly/cli/embed_cli.py |
lightly/cli/lightly_cli.py |
lightly/cli/download_cli.py |
lightly/cli/config/get_config.py |
lightly/cli/train_cli.py |
lightly/cli/_cli_simclr.py |
lightly/cli/_helpers.py |
lightly/loss/ntx_ent_loss.py |
lightly/loss/vicreg_loss.py |
lightly/loss/tico_loss.py |
lightly/loss/pmsn_loss.py |
lightly/loss/swav_loss.py |
lightly/loss/negative_cosine_similarity.py |
lightly/loss/hypersphere_loss.py |
lightly/loss/msn_loss.py |
lightly/loss/dino_loss.py |
lightly/loss/sym_neg_cos_sim_loss.py |
lightly/loss/vicregl_loss.py |
lightly/loss/dcl_loss.py |
lightly/loss/regularizer/co2.py |
lightly/loss/barlow_twins_loss.py |
lightly/data/dataset.py |
lightly/data/collate.py |
lightly/data/_image_loaders.py |
lightly/data/_video.py |
lightly/core.py |
lightly/api/api_workflow_compute_worker.py |
lightly/api/api_workflow_predictions.py |
lightly/api/download.py |
lightly/api/api_workflow_export.py |
lightly/api/api_workflow_download_dataset.py |
lightly/api/bitmask.py |
lightly/api/_version_checking.py |
lightly/api/patch.py |
lightly/api/swagger_api_client.py |
lightly/api/api_workflow_collaboration.py |
lightly/api/utils.py |
lightly/api/api_workflow_datasets.py |
lightly/api/api_workflow_selection.py |
lightly/api/swagger_rest_client.py |
lightly/api/api_workflow_datasources.py |
lightly/api/api_workflow_upload_embeddings.py |
lightly/api/api_workflow_client.py |
lightly/api/api_workflow_upload_metadata.py |
lightly/api/api_workflow_tags.py |
lightly/api/api_workflow_artifacts.py |
lightly/utils/cropping/crop_image_by_bounding_boxes.py |
lightly/utils/cropping/read_yolo_label_file.py |
lightly/utils/debug.py |
lightly/utils/benchmarking/benchmark_module.py |
lightly/utils/benchmarking/knn_classifier.py |
lightly/utils/benchmarking/online_linear_classifier.py |
lightly/models/modules/masked_autoencoder.py |
lightly/models/modules/ijepa.py |
lightly/models/utils.py |
tests/cli/test_cli_version.py |
tests/cli/test_cli_magic.py |
tests/cli/test_cli_crop.py |
tests/cli/test_cli_download.py |
tests/cli/test_cli_train.py |
tests/cli/test_cli_get_lighty_config.py |
tests/cli/test_cli_embed.py |
tests/UNMOCKED_end2end_tests/delete_datasets_test_unmocked_cli.py |
tests/UNMOCKED_end2end_tests/create_custom_metadata_from_input_dir.py |
tests/UNMOCKED_end2end_tests/scripts_for_reproducing_problems/test_api_latency.py |
tests/loss/test_NegativeCosineSimilarity.py |
tests/loss/test_MSNLoss.py |
tests/loss/test_DINOLoss.py |
tests/loss/test_VICRegLLoss.py |
tests/loss/test_CO2Regularizer.py |
tests/loss/test_DCLLoss.py |
tests/loss/test_barlow_twins_loss.py |
tests/loss/test_SymNegCosineSimilarityLoss.py |
tests/loss/test_NTXentLoss.py |
tests/loss/test_MemoryBank.py |
tests/loss/test_TicoLoss.py |
tests/loss/test_VICRegLoss.py |
tests/loss/test_PMSNLoss.py |
tests/loss/test_HyperSphere.py |
tests/loss/test_SwaVLoss.py |
tests/core/test_Core.py |
tests/data/test_multi_view_collate.py |
tests/data/test_data_collate.py |
tests/data/test_LightlySubset.py |
tests/data/test_LightlyDataset.py |
tests/embedding/test_callbacks.py |
tests/embedding/test_embedding.py |
tests/api/test_serve.py |
tests/api/test_swagger_rest_client.py |
tests/api/test_rest_parser.py |
tests/api/test_utils.py |
tests/api/benchmark_video_download.py |
tests/api/test_BitMask.py |
tests/api/test_patch.py |
tests/api/test_download.py |
tests/api/test_version_checking.py |
tests/api/test_swagger_api_client.py |
tests/utils/test_debug.py |
tests/utils/benchmarking/test_benchmark_module.py |
tests/utils/benchmarking/test_topk.py |
tests/utils/benchmarking/test_online_linear_classifier.py |
tests/utils/benchmarking/test_knn_classifier.py |
tests/utils/benchmarking/test_knn.py |
tests/utils/benchmarking/test_linear_classifier.py |
tests/utils/benchmarking/test_metric_callback.py |
tests/utils/test_dist.py |
tests/conftest.py |
tests/api_workflow/test_api_workflow_selection.py |
tests/api_workflow/test_api_workflow_datasets.py |
tests/api_workflow/mocked_api_workflow_client.py |
tests/api_workflow/test_api_workflow_compute_worker.py |
tests/api_workflow/test_api_workflow_artifacts.py |
tests/api_workflow/test_api_workflow_download_dataset.py |
tests/api_workflow/utils.py |
tests/api_workflow/test_api_workflow_client.py |
tests/api_workflow/test_api_workflow_export.py |
tests/api_workflow/test_api_workflow_datasources.py |
tests/api_workflow/test_api_workflow_tags.py |
tests/api_workflow/test_api_workflow_upload_custom_metadata.py |
tests/api_workflow/test_api_workflow_upload_embeddings.py |
tests/api_workflow/test_api_workflow_collaboration.py |
tests/api_workflow/test_api_workflow_predictions.py |
tests/api_workflow/test_api_workflow.py |
# Let's not type check deprecated active learning:
lightly/active_learning |
# Let's not type deprecated models:
lightly/models/simclr.py |
lightly/models/moco.py |
lightly/models/barlowtwins.py |
lightly/models/nnclr.py |
lightly/models/simsiam.py |
lightly/models/byol.py |
# Let's not type deprecated models tests:
tests/models/test_ModelsSimSiam.py |
tests/models/test_ModelsSimCLR.py |
tests/models/test_ModelsNNCLR.py |
tests/models/test_ModelsMoCo.py |
tests/models/test_ModelsBYOL.py )'''
# Ignore imports from untyped modules.
[[tool.mypy.overrides]]
module = [
"lightly.api.*",
"lightly.cli.*",
"lightly.data.*",
"lightly.loss.*",
"lightly.models.*",
"lightly.utils.benchmarking.*",
"tests.api_workflow.*",
]
follow_imports = "skip"
# Ignore errors in auto generated code.
[[tool.mypy.overrides]]
module = [
"lightly.openapi_generated.*",
]
ignore_errors = true
[tool.jupytext]
notebook_metadata_filter="-all"
cell_metadata_filter="-all"