forked from wandb/wandb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
197 lines (182 loc) · 6.07 KB
/
tox.ini
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
; NOTE: We're gradually replacing tox with nox. See noxfile.py instead.
[tox]
minversion=4.5.1
envlist=greet
[testenv]
package=wheel
wheel_build_env=.pkg
setenv=
PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu
PIP_TIMEOUT=600
[testenv:.pkg]
setenv=
WANDB_BUILD_COVERAGE=true
WANDB_BUILD_GORACEDETECT=true
WANDB_BUILD_UNIVERSAL=false
[testenv:greet]
skip_install=true
commands=
python -c "print('\nGreetings, wandb developer!\\nTo execute a tox environment, run `tox run -e <envname>`\n')"
[base]
deps=
-r{toxinidir}/requirements_dev.txt
setenv=
; Setting low network buffer so that we exercise flow control logic
WANDB__NETWORK_BUFFER=1000
COVERAGE_FILE={envdir}/.coverage
YEA_WANDB_VERSION=0.9.20
WANDB_ERROR_REPORTING=false
passenv=
USERNAME
CI_PYTEST_SPLIT_ARGS
[testenv:{,importer-wandb-,importer-mlflow-}py{37,38,39,310,311,312}]
deps=
{[base]deps}
!py37-!mlflow: .[workspaces]
!py37-!mlflow: polyfactory
wheel
build
nox
importer-mlflow: pydantic<2
importer-wandb: pydantic>=2
importer: polars
importer: rich
importer: filelock
setenv=
{[base]setenv}
WINDIR=C:\\Windows
GOCOVERDIR={tox_root}/.coverage
passenv=
{[base]passenv}
CI_PYTEST_PARALLEL
CI
importer-wandb: WANDB_TEST_SERVER_URL2
allowlist_externals=
mkdir
nox
go
commands_pre=
mkdir -p test-results .coverage
commands=
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}
commands_post=
go tool covdata textfmt -i=.coverage -o coverage.txt
[testenv:launch-release]
deps=
pytest
wandb
wandb[launch]
commands=
wandb login
pytest tests/release_tests/test_launch/ {posargs}
[testenv:func-{llm,kfp}-py{37,38,39,310,311,312}]
deps=
yea-wandb=={env:YEA_WANDB_VERSION}
setenv=
{[base]setenv}
YEACOV_SOURCE={envsitepackagesdir}/wandb/
kfp: WB_PROBE_PACKAGE=true
passenv=
{[base]passenv}
; llm: WANDB_API_KEY
llm: OPENAI_API_KEY
llm: CO_API_KEY
allowlist_externals=
mkdir
commands_pre=
mkdir -p test-results
; llm: wandb login --relogin {env:WANDB_API_KEY}
commands=
; 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}
llm: yea {env:CI_PYTEST_SPLIT_ARGS:} --strict --shard llm run {posargs:--all}
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}
[testenv:standalone-{local,cpu,gpu,tpu}-py{37,38,39,310,311,312}]
setenv=
{[base]setenv}
YEACOV_SOURCE={envsitepackagesdir}/wandb/
WANDB_PROJECT=standalone-{env:DATE}
passenv=
DATE
USERNAME
WANDB_API_KEY
SHARD
deps=
yea-wandb=={env:YEA_WANDB_VERSION}
allowlist_externals=
mkdir
go
commands_pre=
wandb login --relogin {env:WANDB_API_KEY}
commands=
mkdir -p test-results
!{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}
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}
[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}]
deps=
pyyaml
six
wandb
shortuuid
setenv=
{[base]setenv}
passenv=*
allowlist_externals=
git
rm
env
changedir=
{envdir}
commands_pre=
rm -rf wandb-testing
git clone https://github.com/wandb/wandb-testing.git
commands=
yolov5: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/yolov5/ {posargs}"
huggingface: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/huggingface/ {posargs}"
keras: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/keras/ {posargs}"
tensorflow: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/tensorflow/ {posargs}"
pytorch: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/pytorch/ {posargs}"
wandb-sdk-standalone: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/wandb-git/client/standalone_tests/ {posargs}"
wandb-sdk-examples: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/wandb-git/examples/ {posargs}"
wandb-sdk-other: env bash -c "./wandb-testing/regression/do-cloud-regression.sh tests/main/wandb-git/wandb-examples/ {posargs}"
sagemaker: env bash -c "./wandb-testing/regression/do-sagemaker-regression.sh tests/sagemaker-beta/ {posargs}"
s3: env bash -c "./wandb-testing/regression/do-s3-regression.sh tests/s3-beta/ {posargs}"
[testenv:executor-{pex,uwsgi,gunicorn}]
basepython=python3.9
deps=
{uwsgi,gunicorn}: flask
gunicorn: gunicorn
uwsgi: uwsgi
pex: pex
setenv=
{[base]setenv}
passenv=*
allowlist_externals=
bash
commands=
bash tests/standalone_tests/executor_tests/{envname}.sh {posargs}
[testenv:cover-func-{linux,mac,win}{,-circle}]
skip_install=true
basepython=python3
deps=
coverage[toml]
setenv=
circle: CIRCLE_BUILD_NUM={env:CIRCLE_WORKFLOW_ID}
passenv=
circle: CI
circle: CIRCLECI
circle: CIRCLE_*
circle: CODECOV_*
COVERAGE_DIR
allowlist_externals=
mkdir
cp
!{win}: env
commands=
mkdir -p cover-results
!{win}: env bash -c '{envpython} -m coverage combine {toxworkdir}/{env:COVERAGE_DIR}/.coverage*'
!{win}: env bash -c '{envpython} -m coverage xml --ignore-errors'
win: {envpython} -m coverage combine '{toxworkdir}\\{env:COVERAGE_DIR}\\.coverage'
win: {envpython} -m coverage xml --ignore-errors
cp .coverage coverage.xml cover-results/
!{win}: coverage report --rcfile=.coveragerc
win: {envpython} -m coverage report --rcfile=.coveragerc