From 142bce9efb402bf8dad0416cfa9fa7a4f5fd93a3 Mon Sep 17 00:00:00 2001 From: SolenoidWGT <877825076@qq.com> Date: Wed, 18 Jan 2023 11:44:18 +0000 Subject: [PATCH] modify test_learner_with_coordinator loop range and remove python3.7 from cudatest --- .github/workflows/unit_test.yml | 4 ++-- Makefile | 6 ++++-- .../learner/comm/tests/test_learner_with_coordinator.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 39bf206f34..c6d62e7bea 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -63,7 +63,7 @@ jobs: if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: matrix: - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.8", "3.9"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -84,7 +84,7 @@ jobs: if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: matrix: - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.8", "3.9"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/Makefile b/Makefile index 754fba2ffd..cc53a7ca57 100644 --- a/Makefile +++ b/Makefile @@ -17,12 +17,14 @@ WORKERS_COMMAND := $(if ${WORKERS},-n ${WORKERS} --dist=loadscope,) DURATIONS ?= 10 DURATIONS_COMMAND := $(if ${DURATIONS},--durations=${DURATIONS},) +TIMEOUT_LIMIT ?= 300 + docs: $(MAKE) -C ${DING_DIR}/docs html unittest: pytest ${TEST_DIR} \ - --timeout=180 \ + --timeout=${TIMEOUT_LIMIT} \ --cov-report=xml \ --cov-report term-missing \ --cov=${COV_DIR} \ @@ -37,7 +39,7 @@ algotest: cudatest: pytest ${TEST_DIR} \ - --timeout=180 \ + --timeout=${TIMEOUT_LIMIT} \ -sv -m cudatest envpooltest: diff --git a/ding/worker/learner/comm/tests/test_learner_with_coordinator.py b/ding/worker/learner/comm/tests/test_learner_with_coordinator.py index be98f12822..c6c4e17bc1 100644 --- a/ding/worker/learner/comm/tests/test_learner_with_coordinator.py +++ b/ding/worker/learner/comm/tests/test_learner_with_coordinator.py @@ -17,7 +17,7 @@ def setup_config(): cfg = compile_config_parallel( parallel_test_main_config, create_cfg=parallel_test_create_config, system_cfg=parallel_test_system_config ) - cfg.main.policy.learn.learner.train_iterations = 100 + cfg.main.policy.learn.learner.train_iterations = 10 return cfg