mirror of
https://github.com/facebookresearch/ReAgent.git
synced 2026-05-17 12:40:39 +00:00
Adjusting CircleCI config (#323)
Summary: Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/323 Add pytorch-lightning to dep. Change installation commands so that pytorch is installed along with all other deps. Speed up the unittest setup by using the pre-built wheel of opencv-python. Reviewed By: kaiwenw Differential Revision: D24008272 fbshipit-source-id: 05daa225e13033abb8aa622d3fef75d227820f40
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6f68e16794
commit
d54dff1cd6
@@ -153,15 +153,13 @@ commands:
|
||||
steps:
|
||||
- run:
|
||||
command: |
|
||||
pip install -e .[gym,test]
|
||||
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html
|
||||
pip install -e .[gym,test] --pre -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html
|
||||
- unless:
|
||||
condition: << parameters.is_ubuntu_gpu >>
|
||||
steps:
|
||||
- run:
|
||||
command: |
|
||||
sudo pip install -e .[gym,test]
|
||||
sudo pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html
|
||||
sudo pip install -e .[gym,test] --pre -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
|
||||
|
||||
run_unittest:
|
||||
description: Run unittests, coverage and save results
|
||||
@@ -172,7 +170,7 @@ commands:
|
||||
- run:
|
||||
no_output_timeout: 30m
|
||||
command: |
|
||||
tox -e << parameters.tox_env >>
|
||||
tox -vv -e << parameters.tox_env >>
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
- run: python setup.py bdist_wheel
|
||||
- store_artifacts:
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools >= 35.0.2",
|
||||
"setuptools_scm >= 2.0.0, <3"
|
||||
"setuptools >= 42",
|
||||
"setuptools_scm[toml] >= 3.4",
|
||||
"wheel"
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
[tool.setuptools_scm]
|
||||
|
||||
@@ -24,6 +24,7 @@ install_requires =
|
||||
petastorm>=0.9.0
|
||||
parameterized>=0.7.4
|
||||
pyspark==2.4.6
|
||||
pytorch-lightning
|
||||
ruamel.yaml>=0.15.99
|
||||
scipy>=1.3.1
|
||||
tensorboard>=1.14
|
||||
@@ -31,15 +32,16 @@ install_requires =
|
||||
|
||||
[options.extras_require]
|
||||
gym =
|
||||
gym[classic_control,box2d,atari]
|
||||
# Some issue with https://github.com/openai/gym/pull/1974
|
||||
# Remove the pinning when https://github.com/openai/gym/issues/2058 is fixed
|
||||
gym[classic_control,box2d,atari]==0.17.2
|
||||
gym_minigrid
|
||||
recsim-no-tf
|
||||
|
||||
test =
|
||||
coverage>=5.1
|
||||
pytest-xdist==1.30.0
|
||||
# Pinning due to https://github.com/pytest-dev/pytest/issues/6925
|
||||
pytest==5.3
|
||||
pytest-xdist>=1.30.0
|
||||
pytest>=5.3
|
||||
spark-testing-base==0.10.0
|
||||
pytest-cov
|
||||
|
||||
|
||||
@@ -5,42 +5,45 @@
|
||||
|
||||
[tox]
|
||||
envlist = py37
|
||||
isolated_build = True
|
||||
|
||||
# install CUDA 10.1 Torch
|
||||
[ubuntu_gpu]
|
||||
commands_pre =
|
||||
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html
|
||||
install_command =
|
||||
pip install --pre -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html {opts} {packages}
|
||||
|
||||
[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
|
||||
setenv =
|
||||
PYTEST_ADDOPTS=--verbose -d --tx popen --cov --cov-report=xml --cov-append --junitxml={envlogdir}/junit-{envname}.xml
|
||||
commands_pre =
|
||||
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
|
||||
install_command =
|
||||
pip install --pre -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html {opts} {packages}
|
||||
commands =
|
||||
pytest -n 4 -m "(not serial) and (not seq2slate_long)"
|
||||
pytest -n0 -m "serial"
|
||||
|
||||
[testenv:circleci_unittest]
|
||||
commands_pre = {[ubuntu_gpu]commands_pre}
|
||||
install_command = {[ubuntu_gpu]install_command}
|
||||
commands =
|
||||
pytest reagent/test -n auto -m "(not serial) and (not seq2slate_long)"
|
||||
pytest reagent/test -n0 -m "serial"
|
||||
|
||||
[testenv:circleci_gym_unittest]
|
||||
commands_pre = {[ubuntu_gpu]commands_pre}
|
||||
install_command = {[ubuntu_gpu]install_command}
|
||||
commands =
|
||||
pytest reagent/gym/tests -n2 -m "(not serial) and (not seq2slate_long)"
|
||||
pytest reagent/gym/tests -n0 -m "serial"
|
||||
|
||||
|
||||
[testenv:circleci_seq2slate_unittest]
|
||||
commands_pre = {[ubuntu_gpu]commands_pre}
|
||||
install_command = {[ubuntu_gpu]install_command}
|
||||
commands =
|
||||
pytest reagent/test -n0 -m "seq2slate_long"
|
||||
|
||||
Reference in New Issue
Block a user