From cbc7a4e0deedd32be033837733fa27f1100c64df Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:23:40 +0530 Subject: [PATCH 01/15] added checksum for retinanet --- script/get-ml-model-retinanet/_cm.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/get-ml-model-retinanet/_cm.json b/script/get-ml-model-retinanet/_cm.json index 4b3862512..98a5dbef5 100644 --- a/script/get-ml-model-retinanet/_cm.json +++ b/script/get-ml-model-retinanet/_cm.json @@ -85,7 +85,8 @@ "pytorch,fp32": { "env": { "CM_PACKAGE_URL": "https://zenodo.org/record/6617981/files/resnext50_32x4d_fpn.pth", - "CM_ML_MODEL_ACCURACY": "0.3755" + "CM_ML_MODEL_ACCURACY": "0.3755", + "CM_DOWNLOAD_CHECKSUM": "a55f6bec3464f605ce8d686da8ac1533" } }, @@ -99,7 +100,8 @@ "CM_PACKAGE_URL": "https://zenodo.org/record/6605272/files/retinanet_model_10.zip?download=1", "CM_UNZIP": "yes", "CM_ML_MODEL_FILE": "retinanet_model_10.pth", - "CM_ML_MODEL_ACCURACY": "0.3755" + "CM_ML_MODEL_ACCURACY": "0.3755", + "CM_DOWNLOAD_CHECKSUM": "2037c152a6be18e371ebec654314f7e0 " }, "add_deps_recursive": { "dae": { From 6fe797233d496d384f0e78b1c786ad4a5f301f75 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:53:54 +0530 Subject: [PATCH 02/15] modified for checksum after download through cmutil --- script/download-file/run.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/script/download-file/run.sh b/script/download-file/run.sh index 8fdefc750..4c48f9486 100644 --- a/script/download-file/run.sh +++ b/script/download-file/run.sh @@ -45,11 +45,15 @@ if [[ ${require_download} == "1" ]]; then eval "${CM_DOWNLOAD_CMD}" test $? -eq 0 || exit $? +fi + +if [[ ${CM_DOWNLOAD_TOOL} == "cmutil" || ${require_download} == "1" ]]; then if [[ "${CM_DOWNLOAD_CHECKSUM_CMD}" != "" ]]; then - echo "" - echo "${CM_DOWNLOAD_CHECKSUM_CMD}" - eval "${CM_DOWNLOAD_CHECKSUM_CMD}" - test $? -eq 0 || exit $? + echo "" + echo "${CM_DOWNLOAD_CHECKSUM_CMD}" + eval "${CM_DOWNLOAD_CHECKSUM_CMD}" + test $? -eq 0 || exit $? fi fi + test $? -eq 0 || exit $? From 40d16ed208011b49b27fc4dd39399ec32bd3fa80 Mon Sep 17 00:00:00 2001 From: anandhu-eng Date: Fri, 20 Sep 2024 15:00:56 +0530 Subject: [PATCH 03/15] download and extract cached --- script/get-ml-model-retinanet/_cm.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/get-ml-model-retinanet/_cm.json b/script/get-ml-model-retinanet/_cm.json index 98a5dbef5..fff6ba1cf 100644 --- a/script/get-ml-model-retinanet/_cm.json +++ b/script/get-ml-model-retinanet/_cm.json @@ -45,7 +45,9 @@ "CM_TMP_ML_MODEL_RETINANET_NO_NMS": [ "yes" ] - } + }, + "force_cache": true, + "extra_cache_tags": "get,ml-model,model-retinanet" } ], "variations": { From 94ec27d1b2cadf5aa71fead7c134f0bdf8ef1668 Mon Sep 17 00:00:00 2001 From: anandhu-eng Date: Fri, 20 Sep 2024 15:44:07 +0530 Subject: [PATCH 04/15] enabled post download checksum for cmutil --- script/download-file/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/download-file/run.sh b/script/download-file/run.sh index 4c48f9486..b738a7cd1 100644 --- a/script/download-file/run.sh +++ b/script/download-file/run.sh @@ -51,8 +51,8 @@ if [[ ${CM_DOWNLOAD_TOOL} == "cmutil" || ${require_download} == "1" ]]; then if [[ "${CM_DOWNLOAD_CHECKSUM_CMD}" != "" ]]; then echo "" echo "${CM_DOWNLOAD_CHECKSUM_CMD}" - eval "${CM_DOWNLOAD_CHECKSUM_CMD}" - test $? -eq 0 || exit $? + eval "${CM_DOWNLOAD_CHECKSUM_CMD}" + test $? -eq 0 || exit $? fi fi From e08e0a63a31dc811b14878e0c84c630c4b6b6d1b Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 11:49:59 +0100 Subject: [PATCH 05/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 880de26cf..8e658a091 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -31,6 +31,10 @@ jobs: python -m pip install cmind cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} cm run script --quiet --tags=get,sys-utils-cm + - name: Setup docker on macos + if: runner.os =='macos' + run: | + brew install docker - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From 08e3b7629b1da27073a56bdca1168abf95896f46 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 11:59:41 +0100 Subject: [PATCH 06/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 8e658a091..72b556959 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -34,7 +34,7 @@ jobs: - name: Setup docker on macos if: runner.os =='macos' run: | - brew install docker + brew install --cask docker - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From d8276a303ddb9a7bb95dc77db3c4803285da28c7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 12:10:54 +0100 Subject: [PATCH 07/15] Fix docker path on macos GH action | Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 72b556959..a56e93200 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -35,6 +35,7 @@ jobs: if: runner.os =='macos' run: | brew install --cask docker + echo "$HOME/.docker/bin" >> $GITHUB_PATH - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From a6e006f24f4e0c24281bfb11887e06c2805f4046 Mon Sep 17 00:00:00 2001 From: anandhu-eng Date: Fri, 20 Sep 2024 16:42:42 +0530 Subject: [PATCH 08/15] default precision changed to fp32 --- script/app-mlperf-inference/_cm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/app-mlperf-inference/_cm.yaml b/script/app-mlperf-inference/_cm.yaml index 8e268f625..15a46a7a9 100644 --- a/script/app-mlperf-inference/_cm.yaml +++ b/script/app-mlperf-inference/_cm.yaml @@ -663,7 +663,7 @@ variations: CM_MODEL: stable-diffusion-xl CM_MLPERF_INFERENCE_TEST_QPS: "0.05" default_variations: - precision: float16 + precision: float32 add_deps_recursive: mlperf-inference-implementation: tags: _sdxl From 300a60c1446c6f1752efc84b7429e71c9df72094 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 12:17:16 +0100 Subject: [PATCH 09/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index a56e93200..9daa144c8 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -36,6 +36,11 @@ jobs: run: | brew install --cask docker echo "$HOME/.docker/bin" >> $GITHUB_PATH + open -a Docker + while ! docker system info > /dev/null 2>&1; do + sleep 5 + done + shell: bash - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From c84d20ee0186eefc9f9df2012f527a2866930c9a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 12:41:49 +0100 Subject: [PATCH 10/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 9daa144c8..0f8b6423f 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -35,12 +35,8 @@ jobs: if: runner.os =='macos' run: | brew install --cask docker - echo "$HOME/.docker/bin" >> $GITHUB_PATH - open -a Docker - while ! docker system info > /dev/null 2>&1; do - sleep 5 - done - shell: bash + brew install docker colima + colima start - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From f2b3075e7edfd987613da1f42c121a22f1fce777 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 12:49:27 +0100 Subject: [PATCH 11/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 0f8b6423f..3248b19b4 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -36,7 +36,10 @@ jobs: run: | brew install --cask docker brew install docker colima - colima start + sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components + open -a /Applications/Docker.app --args --unattended --accept-license + echo "We are waiting for Docker to be up and running. It can take over 2 minutes..." + while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From 9a454de4dc0fc3a07c201f80b5d982af2aa620d5 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 12:54:12 +0100 Subject: [PATCH 12/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 3248b19b4..602b5b80a 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -36,10 +36,7 @@ jobs: run: | brew install --cask docker brew install docker colima - sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components - open -a /Applications/Docker.app --args --unattended --accept-license - echo "We are waiting for Docker to be up and running. It can take over 2 minutes..." - while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done + brew services start colima - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From cc98af585f24d36b5e5f7f3fc9419e437d7fa35a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 13:01:37 +0100 Subject: [PATCH 13/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 602b5b80a..0f8b6423f 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -36,7 +36,7 @@ jobs: run: | brew install --cask docker brew install docker colima - brew services start colima + colima start - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py From 90aa4cfdbd7af40b35f445a2028a8bcd45c37fd4 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 13:07:15 +0100 Subject: [PATCH 14/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 0f8b6423f..68bcb8a82 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -34,6 +34,7 @@ jobs: - name: Setup docker on macos if: runner.os =='macos' run: | + brew upgrade brew install --cask docker brew install docker colima colima start From bb17c6dab172c4d5db733abd21d5f79f071da440 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 20 Sep 2024 13:11:10 +0100 Subject: [PATCH 15/15] Update test-cm-script-features.yml --- .github/workflows/test-cm-script-features.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml index 68bcb8a82..ec0c1c7a9 100644 --- a/.github/workflows/test-cm-script-features.yml +++ b/.github/workflows/test-cm-script-features.yml @@ -31,16 +31,12 @@ jobs: python -m pip install cmind cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} cm run script --quiet --tags=get,sys-utils-cm - - name: Setup docker on macos - if: runner.os =='macos' + - name: Run test_docker on linux + if: runner.os == 'linux' run: | - brew upgrade - brew install --cask docker - brew install docker colima - colima start + python script/test-cm-core/src/script/test_docker.py - name: Test CM Script Features run: | python script/test-cm-core/src/script/test_deps.py python script/test-cm-core/src/script/test_install.py - python script/test-cm-core/src/script/test_docker.py python script/test-cm-core/src/script/test_features.py