-
Notifications
You must be signed in to change notification settings - Fork 147
/
tox.ini
92 lines (78 loc) · 3.71 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
; For all tests that run in Github Actions, see
; .github/workflows/cpu-ci.yml for the workflow definition.
[tox]
envlist = python3.8,test-gpu,test-cpu,test-gpu-integration,test-cpu-integration
[testenv]
commands =
pip install --upgrade pip
pip install -r requirements/base_external.txt -r requirements/pytorch.txt
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/models.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/dataloader.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/NVTabular.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/core.git@{posargs:main}
pip install . --no-deps
[testenv:test-cpu]
; Runs in: Github Actions
; Runs all CPU-based unit tests. NOTE: if you are using an M1 mac, this will fail. You need to
; change the tensorflow dependency to `tensorflow-macos` in requirements/test-cpu.txt.
deps = -rrequirements/test.txt
commands =
{[testenv]commands}
python -m pytest -rsx --cov-config tests/.coveragerc --cov-report term-missing --cov=. tests/unit
[testenv:test-cpu-integration]
; Runs in: Github Actions
; Runs all CPU-based NOTEBOOK tests. NOTE: if you are using an M1 mac, this will fail. You need to
; change the tensorflow dependency to `tensorflow-macos` in requirements/test-cpu.txt.
deps = -rrequirements/test.txt
commands =
{[testenv]commands}
python -m pytest -rsx --cov-config tests/.coveragerc --cov-report term-missing --cov=. tests/integration
[testenv:test-gpu]
sitepackages=true
; Runs in: Internal Jenkins
; Runs GPU-based tests.
; The jenkins jobs run on an image based on merlin-hugectr. This will include all cudf configuration
; and other gpu-specific libraries that we can enxpect will always exist. Thus, we don't need
; to install requirements.txt yet. As we get better at python environment isolation, we will
; need to add some back.
setenv =
TF_GPU_ALLOCATOR=cuda_malloc_async
deps =
-rrequirements/test.txt
commands =
{[testenv]commands}
python -m pytest -rsx --cov-config tests/.coveragerc --cov-report term-missing --cov=. tests/unit
[testenv:test-gpu-integration]
sitepackages=true
setenv =
TF_GPU_ALLOCATOR=cuda_malloc_async
LD_LIBRARY_PATH=/opt/tritonserver/backends/pytorch:{env:LD_LIBRARY_PATH}
deps =
-rrequirements/test.txt
commands =
; install latest Merlin libraries from source
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/core.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/NVTabular.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/dataloader.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/systems.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/models.git@{posargs:main}
python -m pytest -rsx --cov-config tests/.coveragerc --cov-report term-missing --cov=. tests/integration
[testenv:docs]
; Runs in: Github Actions
; Generates documentation with sphinx. There are other steps in the Github Actions workflow
; to publish the documentation on release.
changedir = {toxinidir}
deps = -rrequirements/docs.txt
{[testenv:test-cpu]deps}
commands =
{[testenv]commands}
python -m sphinx.cmd.build -E -b html docs/source docs/build/html
[testenv:docs-multi]
; Run the multi-version build that is shown on GitHub Pages.
changedir = {toxinidir}
deps = -rrequirements/docs.txt
{[testenv:test-cpu]deps}
commands =
{[testenv]commands}
sphinx-multiversion --dump-metadata docs/source docs/build/html | jq "keys"
sphinx-multiversion docs/source docs/build/html