From 8567b47e30be21c1f3422e5f34142838312fec6e Mon Sep 17 00:00:00 2001 From: FrankLeeeee Date: Tue, 23 May 2023 15:11:19 +0800 Subject: [PATCH 1/2] [workflow] fixed testmon cache in build CI --- .github/workflows/build_on_pr.yml | 4 ++-- .gitignore | 4 ++++ colossalai/booster/booster.py | 1 + requirements/requirements-test.txt | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_on_pr.yml b/.github/workflows/build_on_pr.yml index 53355f560911..a5a17d176c9d 100644 --- a/.github/workflows/build_on_pr.yml +++ b/.github/workflows/build_on_pr.yml @@ -136,7 +136,7 @@ jobs: - name: Restore Testmon Cache run: | if [ -d /github/home/testmon_cache ]; then - [ ! -z "$(ls -A /github/home/testmon_cache)" ] && cp -p -r /github/home/testmon_cache/.testmondata /__w/ColossalAI/ColossalAI/ + [ ! -z "$(ls -A /github/home/testmon_cache)" ] && cp -p -r /github/home/testmon_cache/.testmondata* /__w/ColossalAI/ColossalAI/ fi - name: Execute Unit Testing @@ -150,7 +150,7 @@ jobs: - name: Store Testmon Cache run: | [ -d /github/home/testmon_cache ] || mkdir /github/home/testmon_cache - cp -p -r /__w/ColossalAI/ColossalAI/.testmondata /github/home/testmon_cache/ + cp -p -r /__w/ColossalAI/ColossalAI/.testmondata* /github/home/testmon_cache/ - name: Collate artifact env: diff --git a/.gitignore b/.gitignore index bf74a753894f..81113fa99dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -155,3 +155,7 @@ colossalai/version.py # ignore coverage test file coverage.lcov coverage.xml + +# ignore testmon and coverage files +.coverage +.testmondata* diff --git a/colossalai/booster/booster.py b/colossalai/booster/booster.py index be9c1c9dc5e3..a20c4cc2bb5a 100644 --- a/colossalai/booster/booster.py +++ b/colossalai/booster/booster.py @@ -22,6 +22,7 @@ class Booster: Booster is a high-level API for training neural networks. It provides a unified interface for training with different precision, accelerator, and plugin. + Examples: ```python colossalai.launch(...) diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 55edb1b6a512..6895113bc637 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -1,6 +1,7 @@ diffusers fbgemm-gpu==0.2.0 pytest +coverage==7.2.3 git+https://github.com/hpcaitech/pytest-testmon torchvision transformers From 2b03a3ebaf925e7959c1365d527c378303d3569d Mon Sep 17 00:00:00 2001 From: FrankLeeeee Date: Wed, 24 May 2023 10:49:12 +0800 Subject: [PATCH 2/2] polish code --- colossalai/booster/booster.py | 1 - 1 file changed, 1 deletion(-) diff --git a/colossalai/booster/booster.py b/colossalai/booster/booster.py index a20c4cc2bb5a..be9c1c9dc5e3 100644 --- a/colossalai/booster/booster.py +++ b/colossalai/booster/booster.py @@ -22,7 +22,6 @@ class Booster: Booster is a high-level API for training neural networks. It provides a unified interface for training with different precision, accelerator, and plugin. - Examples: ```python colossalai.launch(...)