-
Notifications
You must be signed in to change notification settings - Fork 183
/
setup.cfg
172 lines (159 loc) · 4.54 KB
/
setup.cfg
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
[flake8]
max-line-length = 88
extend-ignore =
# See https://github.com/PyCQA/pycodestyle/issues/373
E203,
exclude =
# Generated gRPC code
./mlserver/grpc/dataplane_pb2*
./mlserver/grpc/model_repository_pb2*
./mlserver.egg-info
./.tox
./venv
[mypy]
ignore_missing_imports = True
plugins = pydantic.mypy
[tool:pytest]
asyncio_mode = auto
addopts = "--import-mode=importlib"
[tox:tox]
basepython = py3
envlist =
mlserver
sklearn
xgboost
lightgbm
mlflow
huggingface
alibi-explain
alibi-detect
all-runtimes
[testenv:mlserver]
deps =
-e{toxinidir}
-r{toxinidir}/requirements/dev.txt
commands =
# Upgrade setuptools, pip and wheel to ensure we mimic the Docker image's
# environment
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/tests
[testenv:sklearn]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/sklearn
-r{toxinidir}/requirements/dev.txt
commands =
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/runtimes/sklearn
[testenv:xgboost]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/xgboost
-r{toxinidir}/requirements/dev.txt
commands =
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/runtimes/xgboost
[testenv:lightgbm]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/lightgbm
-r{toxinidir}/requirements/dev.txt
commands =
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/runtimes/lightgbm
[testenv:mlflow]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/mlflow
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/runtimes/mlflow/requirements/dev.txt
commands =
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/runtimes/mlflow
[testenv:huggingface]
deps =
-e{toxinidir}/runtimes/huggingface
-r{toxinidir}/requirements/dev.txt
commands =
# Avoid conflicts and ensure `protobuf==3.20.3` is used (CVE-2022-1941)
# https://github.com/huggingface/optimum/issues/733
pip install -e{toxinidir}
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/runtimes/huggingface
[testenv:alibi-explain]
deps =
-e{toxinidir}/runtimes/alibi-explain
-e{toxinidir}
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/runtimes/alibi-explain/requirements/dev.txt
setenv =
CUDA_VISIBLE_DEVICES =
commands =
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/runtimes/alibi-explain
[testenv:alibi-detect]
deps =
-e{toxinidir}/runtimes/alibi-detect
-r{toxinidir}/requirements/dev.txt
setenv =
CUDA_VISIBLE_DEVICES =
commands =
# Avoid conflicts and ensure `protobuf==3.20.3` is used (CVE-2022-1941)
pip install -e{toxinidir}
pip install --upgrade setuptools pip wheel
python -m pytest {posargs} {toxinidir}/runtimes/alibi-detect
[testenv:all-runtimes]
deps =
-e{toxinidir}/runtimes/alibi-explain
-e{toxinidir}/runtimes/alibi-detect
-e{toxinidir}/runtimes/sklearn
-e{toxinidir}/runtimes/xgboost
-e{toxinidir}/runtimes/mllib
-e{toxinidir}/runtimes/lightgbm
-e{toxinidir}/runtimes/mlflow
-e{toxinidir}/runtimes/huggingface
-r{toxinidir}/requirements/dev.txt
commands =
# Move other dev deps here - otherwise pip may choke trying to resolve deps
pip install \
-r{toxinidir}/runtimes/mlflow/requirements/dev.txt \
-r{toxinidir}/runtimes/alibi-explain/requirements/dev.txt \
-r{toxinidir}/runtimes/alibi-detect/requirements/dev.txt
pip install \
# Avoid conflicts with TF to ensure `protobuf==3.20.3` is used
# (CVE-2022-1941)
-e{toxinidir}
python -m pytest {posargs} \
{toxinidir}/tests \
{toxinidir}/runtimes/alibi-explain \
{toxinidir}/runtimes/alibi-detect \
{toxinidir}/runtimes/sklearn \
{toxinidir}/runtimes/xgboost \
{toxinidir}/runtimes/mllib \
{toxinidir}/runtimes/lightgbm \
{toxinidir}/runtimes/mlflow \
{toxinidir}/runtimes/huggingface
[testenv:licenses]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/alibi-explain
-e{toxinidir}/runtimes/alibi-detect
-e{toxinidir}/runtimes/sklearn
-e{toxinidir}/runtimes/xgboost
-e{toxinidir}/runtimes/mllib
-e{toxinidir}/runtimes/lightgbm
-e{toxinidir}/runtimes/mlflow
-e{toxinidir}/runtimes/huggingface
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/runtimes/mlflow/requirements/dev.txt
commands =
pip-licenses \
--from=mixed \
--format=csv \
--output-file=./licenses/license_info.csv
pip-licenses \
--from=mixed \
--format=plain-vertical \
--with-license-file \
--no-license-path \
--output-file=./licenses/license.txt