wandb

Форк
0
/
tox.ini 
321 строка · 9.8 Кб
1
[tox]
2
minversion=4.5.1
3
envlist=greet
4

5
[testenv]
6
package = wheel
7
wheel_build_env = .pkg
8

9
[testenv:greet]
10
skip_install=true
11
commands=
12
    python -c "print('\nGreetings, wandb developer!\\nTo execute a tox environment, run `tox run -e <envname>`\n')"
13

14
[black]
15
deps=
16
    black[jupyter]==23.3.0
17

18
[testenv:black{,-check}]
19
basepython=python3.9
20
skip_install=true
21
deps=
22
    {[black]deps}
23
commands=
24
    check: black --check wandb/ tests/ tools/
25
    !{check}: black {posargs:} wandb/ tests/ tools/
26

27
[testenv:mypy{,-report}]
28
basepython=python3
29
skip_install=true
30
deps=
31
    !{report}: types-click
32
    !{report}: pandas-stubs
33
    !{report}: types-Pillow
34
    !{report}: types-PyYAML
35
    !{report}: types-Pygments
36
    !{report}: types-protobuf==4.24.0.4
37
    !{report}: types-pytz
38
    !{report}: types-requests
39
    !{report}: types-setuptools
40
    !{report}: types-six
41
    !{report}: types-tqdm
42
    !{report}: types-openpyxl
43
    !{report}: mypy
44
    !{report}: lxml
45
    !{report}: grpcio
46
    !{report}: httpx
47
    report: pycobertura
48
setenv=
49
    !{report}: MYPYPATH={toxinidir}
50
commands=
51
    !{report}: mypy --install-types --non-interactive --show-error-codes --config-file {toxinidir}/pyproject.toml -p wandb --html-report mypy-results/ --cobertura-xml-report  mypy-results/ --lineprecision-report mypy-results/
52
    report: pycobertura show --format text mypy-results/cobertura.xml
53

54
[testenv:ruff{,-check}]
55
basepython=python3
56
skip_install=true
57
deps=
58
    ruff
59
commands=
60
    check: ruff check {toxinidir}
61
    !{check}: ruff {posargs:} {toxinidir}
62

63
[testenv:auto-codegen{,-check}]
64
basepython=python3
65
deps=
66
    {[black]deps}
67
commands=
68
    check: python tools{/}generate-tool.py --check
69
    !{check}: python tools{/}generate-tool.py --generate {posargs:}
70

71
[base]
72
deps=
73
    -r{toxinidir}/requirements_test.txt
74
    -r{toxinidir}/requirements_tools.txt
75
    !{notebooks}: -r{toxinidir}/requirements_dev.txt
76
    notebooks: nbclient
77
    notebooks: nbconvert
78
    notebooks: nbformat
79
    notebooks: ipykernel
80
    notebooks: ipython<8.17.1
81
setenv=
82
    ; Setting low network buffer so that we exercise flow control logic
83
    WANDB__NETWORK_BUFFER=1000
84
    COVERAGE_FILE={envdir}/.coverage
85
    YEA_WANDB_VERSION=0.9.20
86
passenv=
87
    USERNAME
88
    CI_PYTEST_SPLIT_ARGS
89

90
[testenv:{,core-}{,notebooks-,importer-wandb-,importer-mlflow-}py{37,38,39,310,311,312}]
91
install_command=
92
    ; pytorch installations on non-darwin need the `-f`
93
    pip install --timeout 600 --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
94
deps=
95
    {[base]deps}
96
    !py37-!mlflow: .[reports]
97
    !py37-!mlflow: polyfactory
98
    wheel
99
    build
100
    nox
101
    importer-mlflow: pydantic<2
102
    importer-wandb: pydantic>=2
103
    importer: polars
104
    importer: rich
105
    importer: filelock
106
setenv=
107
    {[base]setenv}
108
    WINDIR=C:\\Windows
109
    GOCOVERDIR={tox_root}/.coverage
110
    WANDB_ERROR_REPORTING=false
111
passenv=
112
    {[base]passenv}
113
    CI_PYTEST_PARALLEL
114
    CI
115
    importer-wandb: WANDB_TEST_SERVER_URL2
116
allowlist_externals=
117
    mkdir
118
    nox
119
    go
120
    ./wini
121
commands_pre=
122
    notebooks: ipython kernel install --user --name=wandb_python
123
    mkdir -p test-results .coverage
124
    core: ./wini package wandb-core --coverage --install
125
commands=
126
    pytest {env:CI_PYTEST_SPLIT_ARGS:} -n=8 --durations=20 --junitxml=test-results/junit.xml --cov --cov-report=xml --no-cov-on-fail --timeout 300 {posargs}
127
commands_post=
128
    core: go tool covdata textfmt -i=.coverage -o coverage.txt
129

130

131
[testenv:launch-release]
132
deps=
133
    pytest
134
    wandb
135
    wandb[launch]
136
commands=
137
    wandb login
138
    pytest tests/release_tests/test_launch/ {posargs}
139

140
[testenv:func-{,core-}{base-,mitm-,docs-}py{37,38,39,310,311,312}]
141
install_command=pip install --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
142
deps =
143
    yea-wandb=={env:YEA_WANDB_VERSION}
144
    core: wheel
145
    core: build
146
    core: nox
147
    core: rich
148
setenv=
149
    {[base]setenv}
150
    YEACOV_SOURCE={envsitepackagesdir}/wandb/
151
    core: GOCOVERDIR={tox_root}/.go-coverage
152
    WANDB_ERROR_REPORTING=false
153
passenv=
154
    {[base]passenv}
155
    SHARD
156
    WANDB_API_KEY
157
    core: GOCOVERDIR
158
allowlist_externals=
159
    mkdir
160
    core: nox
161
    core: go
162
    core: ./wini
163
commands_pre=
164
    mkdir -p test-results
165
    core: mkdir -p {env:GOCOVERDIR}
166
    core: ./wini package wandb-core --coverage --install
167
commands=
168
    base: yea {env:CI_PYTEST_SPLIT_ARGS:} --strict --shard {env:SHARD:default} --mitm run {posargs:--all}
169
    mitm: yea {env:CI_PYTEST_SPLIT_ARGS:} --strict --shard mitm --mitm run {posargs:tests/standalone_tests}
170
    docs: yea {env:CI_PYTEST_SPLIT_ARGS:} --strict --shard docs --mitm --yeadoc run {posargs:tests/functional_tests}
171
commands_post=
172
    core: go tool covdata textfmt -i={env:GOCOVERDIR} -o coverage.txt
173

174

175
[testenv:func-{llm,kfp}-py{37,38,39,310,311,312}]
176
install_command=pip install --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
177
deps=
178
    yea-wandb=={env:YEA_WANDB_VERSION}
179
setenv=
180
    {[base]setenv}
181
    YEACOV_SOURCE={envsitepackagesdir}/wandb/
182
    kfp: WB_PROBE_PACKAGE=true
183
    WANDB_ERROR_REPORTING=false
184
passenv=
185
    {[base]passenv}
186
;    llm: WANDB_API_KEY
187
    llm: OPENAI_API_KEY
188
    llm: CO_API_KEY
189
allowlist_externals=
190
    mkdir
191
commands_pre=
192
    mkdir -p test-results
193
;    llm: wandb login --relogin {env:WANDB_API_KEY}
194
commands=
195
;    llm: yea {env:CI_PYTEST_SPLIT_ARGS:} --strict -p wandb:mockserver-relay=true -p wandb:mockserver-relay-remote-base-url=https://api.wandb.ai --shard llm run {posargs:--all}
196
    llm: yea {env:CI_PYTEST_SPLIT_ARGS:} --strict --shard llm run {posargs:--all}
197
    kfp: yea {env:CI_PYTEST_SPLIT_ARGS:} --strict -p wandb:mockserver-bind=0.0.0.0 -p wandb:mockserver-host=__auto__ --shard kfp run {posargs:--all}
198

199
[testenv:standalone-{local,cpu,gpu,tpu}-py{37,38,39,310,311,312}]
200
install_command=pip install --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
201
setenv=
202
    {[base]setenv}
203
    YEACOV_SOURCE={envsitepackagesdir}/wandb/
204
    WANDB_PROJECT=standalone-{env:DATE}
205
    WANDB_ERROR_REPORTING=false
206
passenv=
207
    DATE
208
    USERNAME
209
    WANDB_API_KEY
210
    SHARD
211
deps=
212
    yea-wandb=={env:YEA_WANDB_VERSION}
213
    wheel
214
    build
215
    nox
216
    rich
217
allowlist_externals=
218
    mkdir
219
    nox
220
    go
221
    ./wini
222
commands_pre=
223
    wandb login --relogin {env:WANDB_API_KEY}
224
    ./wini package wandb-core --coverage --install
225
commands=
226
    mkdir -p test-results
227
    !{local}: yea --debug --strict -p wandb:mockserver-relay=true -p wandb:mockserver-relay-remote-base-url=https://api.wandb.ai --shard standalone-{env:SHARD:cpu} run {posargs:--all}
228
    local: yea --debug --strict -p wandb:mockserver-bind=0.0.0.0 -p wandb:mockserver-host=__auto__ -p wandb:mockserver-relay=true -p wandb:mockserver-relay-remote-base-url=http://localhost:5000 --shard standalone-cpu run {posargs:--all}
229

230
[testenv:regression-{yolov5,huggingface,keras,tensorflow,pytorch,wandb-sdk-standalone,wandb-sdk-examples,wandb-sdk-other,s3,sagemaker}-py{37,38,39,310,311,312}]
231
install_command=pip install --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
232
deps=
233
    pyyaml
234
    six
235
    wandb
236
    shortuuid
237
setenv=
238
    {[base]setenv}
239
    WANDB_ERROR_REPORTING=false
240
passenv=*
241
allowlist_externals=
242
    git
243
    rm
244
    env
245
changedir=
246
    {envdir}
247
commands_pre=
248
    rm -rf wandb-testing
249
    git clone https://github.com/wandb/wandb-testing.git
250
commands=
251
    yolov5: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/yolov5/ {posargs}"
252
    huggingface: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/huggingface/ {posargs}"
253
    keras: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/keras/ {posargs}"
254
    tensorflow: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/tensorflow/ {posargs}"
255
    pytorch: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/pytorch/ {posargs}"
256
    wandb-sdk-standalone: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/wandb-git/client/standalone_tests/ {posargs}"
257
    wandb-sdk-examples: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/wandb-git/examples/ {posargs}"
258
    wandb-sdk-other: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/wandb-git/wandb-examples/ {posargs}"
259
    sagemaker: env bash -c "./wandb-testing/regression/do-sagemaker-regression.sh tests/sagemaker-beta/ {posargs}"
260
    s3: env bash -c "./wandb-testing/regression/do-s3-regression.sh tests/s3-beta/ {posargs}"
261

262
[testenv:executor-{pex,uwsgi,gunicorn}]
263
install_command=pip install --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
264
basepython=python3.9
265
deps=
266
    {uwsgi,gunicorn}: flask
267
    gunicorn: gunicorn
268
    uwsgi: uwsgi
269
    pex: pex
270
setenv=
271
    {[base]setenv}
272
    WANDB_ERROR_REPORTING=false
273
passenv=*
274
allowlist_externals=
275
    bash
276
commands=
277
    bash tests/standalone_tests/executor_tests/{envname}.sh {posargs}
278

279
[testenv:cover{,-func}-{linux,mac,win}{,-circle}]
280
skip_install=true
281
basepython=python3
282
deps=
283
    coverage[toml]
284
setenv=
285
    circle: CIRCLE_BUILD_NUM={env:CIRCLE_WORKFLOW_ID}
286
passenv=
287
    circle: CI
288
    circle: CIRCLECI
289
    circle: CIRCLE_*
290
    circle: CODECOV_*
291
    COVERAGE_DIR
292
allowlist_externals=
293
    mkdir
294
    cp
295
    !{win}: env
296
commands=
297
    mkdir -p cover-results
298
    !{win}: env bash -c '{envpython} -m coverage combine {toxworkdir}/{env:COVERAGE_DIR}/.coverage*'
299
    !{win}: env bash -c '{envpython} -m coverage xml --ignore-errors'
300
    win: {envpython} -m coverage combine '{toxworkdir}\\{env:COVERAGE_DIR}\\.coverage'
301
    win: {envpython} -m coverage xml --ignore-errors
302

303
    cp .coverage coverage.xml cover-results/
304
    !{win}: coverage report --rcfile=.coveragerc
305
    win: {envpython} -m coverage report --rcfile=.coveragerc
306

307
[testenv:pod-store]
308
allowlist_externals=
309
    mkdir
310
    cp
311
commands=
312
    mkdir -p /wandb-store/test-results
313
    cp -rp test-results /wandb-store/test-results
314

315
[testenv:bumpversion]
316
basepython=python3
317
skip_install=true
318
deps=
319
    bump2version
320
commands=
321
    python ./tools/bumpversion-tool.py {posargs:--to-dev }
322

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.