1 Star 0 Fork 23

acrowise/DI-engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
CI := $(shell echo ${CI})
WORKERS ?= 2
WORKERS_COMMAND := $(if ${WORKERS},-n ${WORKERS} --dist=loadscope,)
DURATIONS ?= 10
DURATIONS_COMMAND := $(if ${DURATIONS},--durations=${DURATIONS},)
RANGE_DIR ?=
TEST_DIR ?= $(if ${RANGE_DIR},${RANGE_DIR},./ding)
COV_DIR ?= $(if ${RANGE_DIR},${RANGE_DIR},./ding)
FORMAT_DIR ?= $(if ${RANGE_DIR},${RANGE_DIR},./ding)
PLATFORM_TEST_DIR ?= $(if ${RANGE_DIR},${RANGE_DIR},./ding/entry/tests/test_serial_entry.py ./ding/entry/tests/test_serial_entry_onpolicy.py)
docs:
$(MAKE) -C ./ding/docs html
unittest:
pytest ${TEST_DIR} \
--cov-report=xml \
--cov-report term-missing \
--cov=${COV_DIR} \
${DURATIONS_COMMAND} \
${WORKERS_COMMAND} \
-sv -m unittest \
algotest:
pytest ${TEST_DIR} \
${DURATIONS_COMMAND} \
-sv -m algotest
cudatest:
pytest ${TEST_DIR} \
-sv -m cudatest
envpooltest:
pytest ${TEST_DIR} \
-sv -m envpooltest
dockertest:
./ding/scripts/docker-test-entry.sh
platformtest:
pytest ${PLATFORM_TEST_DIR} \
--cov-report term-missing \
--cov=${COV_DIR} \
${WORKERS_COMMAND} \
-sv -m unittest \
benchmark:
pytest ${TEST_DIR} \
--durations=0 \
-sv -m benchmark
test: unittest # just for compatibility, can be changed later
cpu_test: unittest algotest benchmark
all_test: unittest algotest cudatest benchmark
format:
yapf --in-place --recursive -p --verbose --style .style.yapf ${FORMAT_DIR}
format_test:
bash format.sh ./ding --test
flake_check:
flake8 ./ding
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/acrowise/DI-engine.git
git@gitee.com:acrowise/DI-engine.git
acrowise
DI-engine
DI-engine
main

搜索帮助