forked from facebookresearch/ReAgent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
115 lines (84 loc) · 3.76 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# This post discusses how to specify patterns for testing specific tests
# https://stackoverflow.com/questions/36456920/is-there-a-way-to-specify-which-pytest-tests-to-run-from-a-file
[tox]
envlist = py38
# install CUDA 10.2 Torch
[ubuntu_gpu]
install_command =
pip install --pre -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html {opts} {packages} --progress-bar off
[pytest]
addopts = --verbose -d --tx popen --cov=reagent --cov-report=xml --cov-append --junitxml={envlogdir}/junit-{envname}.xml
# Refer to https://docs.pytest.org/en/stable/example/markers.html
# for how we include/exclude tests in pytest
[testenv]
# Install the latest pip, setuptools, wheel; this is needed for downloading opencv-python wheel,
# instead of building from source (which is super slow).
download = true
extras =
gym
test
install_command =
pip install --pre -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html {opts} {packages} --progress-bar off
commands =
pytest -n2 -m "(not serial) and (not seq2slate_long)"
pytest -n0 -m "serial"
[testenv:circleci_misc_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/test -n2 -m "not serial" --ignore=reagent/test/mab/ --ignore=reagent/test/lite/ --ignore=reagent/test/ranking/ --ignore=reagent/test/training/ --ignore=reagent/test/prediction/ --ignore=reagent/test/world_model/
pytest reagent/test -n0 -m "serial" --ignore=reagent/test/mab/ --ignore=reagent/test/lite/ --ignore=reagent/test/ranking/ --ignore=reagent/test/training/ --ignore=reagent/test/prediction/ --ignore=reagent/test/world_model/
[testenv:circleci_gym_replay_buffer_1_cpu_unittest]
commands =
pytest reagent/gym/tests -n2 -m "not serial" -k "test_replay_buffer_gym_cpu_1"
[testenv:circleci_gym_replay_buffer_2_cpu_unittest]
commands =
pytest reagent/gym/tests -n2 -m "not serial" -k "test_replay_buffer_gym_cpu_2"
# all cpu tests in reagent/gym/tests except test_replay_buffer_gym_cpu_x
[testenv:circleci_gym_cpu_unittest]
commands =
pytest reagent/gym/tests -n2 -m "not serial" -k "not test_replay_buffer_gym_cpu"
[testenv:circleci_gym_replay_buffer_1_gpu_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/gym/tests -n0 -m "serial" -k "test_replay_buffer_gym_gpu_1"
[testenv:circleci_gym_replay_buffer_2_gpu_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/gym/tests -n0 -m "serial" -k "test_replay_buffer_gym_gpu_2"
# all gpu tests in reagent/gym/tests except test_replay_buffer_gym_gpu_x
[testenv:circleci_gym_gpu_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/gym/tests -n0 -m "serial" -k "not test_replay_buffer_gym_gpu"
[testenv:circleci_ranking_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/test/ranking -n2
[testenv:circleci_training_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/test/training -n2
[testenv:circleci_prediction_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/test/prediction -n2
[testenv:circleci_world_model_unittest]
install_command = {[ubuntu_gpu]install_command}
commands =
pytest reagent/test/world_model -n2
[testenv:circleci_lite_api_unittest]
extras =
lite
test
commands =
pytest reagent/test/lite -n2
pytest --doctest-modules reagent/lite -n2 --doctest-continue-on-failure
[testenv:circleci_mab_unittest]
extras =
test
commands =
pytest reagent/test/mab -n2