forked from wandb/wandb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
312 lines (282 loc) · 8.76 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
[build-system]
requires = ["hatchling", "typing_extensions"]
build-backend = "hatchling.build"
[project]
name = "wandb"
dynamic = ["version"]
description = "A CLI and library for interacting with the Weights & Biases API."
authors = [{ name = "Weights & Biases", email = "[email protected]" }]
readme = "package_readme.md"
license = { file = "LICENSE" }
requires-python = ">=3.7"
dependencies = [
"Click>=7.1,!=8.0.0", # click 8.0.0 is broken
"GitPython>=1.0.0,!=3.1.29", # CVE-2022-24439
"requests>=2.0.0,<3",
"psutil>=5.0.0",
"sentry-sdk>=1.0.0",
"docker-pycreds>=0.4.0",
# setuptools is needed for distutils in dependencies after Python 3.12 :(
# One such dependency is docker-pycreds, where the latest release is 0.4.0
# which was released in 2018.
"setuptools",
"protobuf>=3.12.0,!=4.21.0,!=5.28.0,<6; python_version < '3.9' and sys_platform == 'linux'",
"protobuf>=3.15.0,!=4.21.0,!=5.28.0,<6; python_version == '3.9' and sys_platform == 'linux'",
"protobuf>=3.19.0,!=4.21.0,!=5.28.0,<6; python_version > '3.9' and sys_platform == 'linux'",
"protobuf>=3.19.0,!=4.21.0,!=5.28.0,<6; sys_platform != 'linux'",
"PyYAML",
"setproctitle",
"platformdirs",
"typing_extensions; python_version < '3.10'",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Logging",
"Topic :: System :: Monitoring",
]
[project.scripts]
wandb = "wandb.cli.cli:cli"
wb = "wandb.cli.cli:cli"
[project.urls]
"Source" = "https://github.com/wandb/wandb"
"Bug Reports" = "https://github.com/wandb/wandb/issues"
"Documentation" = "https://docs.wandb.ai/"
[project.optional-dependencies]
kubeflow = ["kubernetes", "minio", "google-cloud-storage", "sh"]
gcp = ["google-cloud-storage"]
aws = ["boto3"]
azure = ["azure-identity", "azure-storage-blob"]
media = [
"numpy",
"moviepy",
# imageio is a dependency of moviepy but incase that changes we also pin it here
"imageio",
"pillow",
"bokeh",
"soundfile",
"plotly>=5.18.0",
"rdkit",
]
sweeps = ["sweeps>=0.2.0"]
launch = [
"awscli",
"azure-identity",
"azure-containerregistry",
"azure-storage-blob",
"boto3",
"botocore",
"chardet",
"google-auth",
"google-cloud-aiplatform",
"google-cloud-artifact-registry",
"google-cloud-compute",
"google-cloud-storage",
"iso8601",
"jsonschema",
"kubernetes",
"kubernetes_asyncio",
"optuna",
"nbconvert",
"nbformat",
"pydantic",
"typing_extensions",
"tomli",
"PyYAML>=6.0.0",
]
models = ["cloudpickle"]
perf = ["orjson"]
importers = ["polars<=1.2.1", "rich", "filelock", "mlflow", "tenacity"]
workspaces = ["wandb-workspaces"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
minversion = "6.0"
console_output_style = "count"
addopts = "-vvv --cov-config=pyproject.toml --dist=loadscope"
markers = [
"image_output",
"multiclass",
"wandb_args",
"flaky",
"skip_wandb_core(feature): skip tests that fail on wandb-core, gropued by feature",
"wandb_core_only: tests for features only available with wandb-core",
]
timeout = 60
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
filterwarnings = ["ignore::DeprecationWarning", "error:ResourceWarning"]
testpaths = "tests"
# The testpaths setting is ignored by VSCode's usage of pytest --collect-only,
# causing it to execute files named test_*.py while trying to do pytest
# discovery. Some of these files, in particular old "yea" tests, execute
# code at the top-level.
norecursedirs = [
# Custom directories to ignore:
"vendor",
"wandb/vendor",
"landfill",
# Standard directories to ignore:
".*",
"build",
"dist",
]
[tool.coverage.paths]
source = ["wandb"]
[tool.coverage.run]
# branch = true
concurrency = ["multiprocessing", "thread"]
source = ["wandb"]
omit = ["**/wandb/vendor/**", "**/wandb/proto/**"]
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:", "@abstractmethod"]
omit = ["**/wandb/vendor/**", "**/wandb/proto/**"]
ignore_errors = true
[tool.ruff]
extend-exclude = [
"landfill/**",
"wandb/__init__.py",
"wandb/vendor/**",
"wandb/proto/**",
]
target-version = "py37"
[tool.ruff.lint]
select = ["F", "E", "W", "B", "I", "N", "D", "C90", "UP"]
ignore = [
"B904",
"E501",
# pydocstyle rules: https://docs.astral.sh/ruff/rules/#pydocstyle-d
"D100", # Allow missing docstrings in modules.
"D101", # Allow missing docstrings in classes.
"D104", # Allow missing docstrings in packages.
"D105", # Allow missing docstrings in magic (dunder) methods, e.g. __str__().
"D106", # Allow missing docstrings in nested classes.
"D107", # Allow missing docstrings in __init__ methods.
"UP022",
"UP032", # Allow using format instead of f-string.
"UP036",
]
[tool.ruff.lint.mccabe]
max-complexity = 18
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
[tool.ruff.lint.pydocstyle]
convention = "google"
ignore-decorators = [
# Allow undocumented @property descriptors for now.
# As of May 2024, many in the public API module(s) currently lack docs, or may plausibly have been intended
# for internal use only. Consider removing this exemption in the future, when/if/as appropriate.
"property",
]
[tool.ruff.lint.per-file-ignores]
# Ensure stricter docstring requirements for public API module(s).
"!wandb/apis/public/api.py" = [ # Consider expanding to other `wandb.api.public` submodules as well.
"D101", # Require docstrings in public classes
"D102", # Require docstrings in public methods
"D103", # Require docstrings in public functions
"D417", # Require descriptions for all arguments
]
"**/__init__.py" = ["E402", "F401"]
"wandb/__init__.py" = ["I001"]
"wandb/__init__.pyi" = ["UP006", "UP007"]
"wandb/__init__.template.pyi" = ["UP006", "UP007", "D415", "N999"]
"wandb/cli/cli.py" = ["C901"]
"wandb/wandb_controller.py" = ["N806"]
"wandb/sklearn/**" = ["B010", "B011", "N803", "N806", "UP031"]
"wandb/wandb_torch.py" = ["C901", "D", "E741", "F841"]
"wandb/integration/metaflow/metaflow.py" = ["F811"]
"wandb/integration/magic.py" = ["B026", "F401", "F841", "N806", "N818"]
"wandb/plot/**" = ["D", "B007", "F401", "N812", "F841", "UP031"]
"wandb/old/**" = ["B006", "B020", "D", "F822"]
# Don't require docstrings on test functions.
"tests/**" = ["D"]
"landfill/**" = ["F405", "N806", "D415"]
[tool.mypy]
warn_redundant_casts = true
exclude = '''
(?x)(
wandb/vendor/.
)
'''
# wandb.*
[[tool.mypy.overrides]]
module = "wandb.*"
ignore_errors = false
[[tool.mypy.overrides]]
module = [
"wandb.integration.*",
"wandb.apis.*",
"wandb.proto.*",
"wandb.beta.*",
"wandb.sdk.wandb_login",
"wandb.cli.*",
"wandb.wandb_torch.*",
"wandb.wandb_controller.*",
"wandb.wandb_agent.*",
"wandb.sdk.verify.*",
"wandb.trigger.*",
"wandb.wandb_summary.*",
"wandb.jupyter.*",
"wandb.sync.*",
"wandb.sdk.integration_utils.*",
"wandb.plot.*",
"wandb.old.*",
]
ignore_errors = true
# wandb/env
[[tool.mypy.overrides]]
module = "wandb.env"
ignore_errors = false
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
check_untyped_defs = true
disallow_untyped_decorators = true
strict_equality = true
implicit_reexport = false
# wandb/filesync.*
[[tool.mypy.overrides]]
module = "wandb.filesync.*"
ignore_errors = false
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
check_untyped_defs = true
disallow_untyped_calls = false
disallow_untyped_decorators = true
strict_equality = true
implicit_reexport = false
# More wandb/ modules can be added in a similar manner as overrides
# External libraries
[[tool.mypy.overrides]]
module = [
"psutil.*",
"tensorboard.*",
"grpc.*",
"setproctitle.*",
"ultralytics.*",
"wandb_gql.*",
"wandb_graphql.*",
"wandb.vendor.*",
"wandb.vendor.pynvml.pynvml.*",
]
ignore_missing_imports = true