From ed7265558f41bce50412aadf7cb67d2b76e30d52 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 9 Aug 2023 10:54:24 +0800 Subject: [PATCH 01/25] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 2aa2bdd..3d2fa7f 100644 --- a/hello.py +++ b/hello.py @@ -1,4 +1,4 @@ print("hello!!!") print("hello!p!!") print("test") -print("222") \ No newline at end of file +print("2221") \ No newline at end of file From 0527f9a360b24b3b1a374a33c98bf4724b09ee8c Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 9 Aug 2023 10:56:39 +0800 Subject: [PATCH 02/25] update Signed-off-by: Sun, Xuehao --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6dd814b..9e60940 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - name: is_perf_reg run: | - if [ ${{ env.is_perf_reg }} == 'true' ]; then + if [ ${{ env.is_perf_reg }} != 'true' ]; then echo "[Performance Regression] Some model performance regression occurred, please check artifacts and reports." exit 1 else From 68aae6b1479c13e97cf0e996bdd68b4364da4a17 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 14:29:04 +0800 Subject: [PATCH 03/25] for test Signed-off-by: Sun, Xuehao --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3aa88b9..a1f8619 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# test-azure \ No newline at end of file +- Step 2: Enable pruning functionalities + + \[**Experimental option** \]Modify model and optimizer. From d7e5c8193d6ead2da95064f87b57facd3c7cbb6d Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 14:30:57 +0800 Subject: [PATCH 04/25] for test Signed-off-by: Sun, Xuehao --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index a1f8619..4020966 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ - Step 2: Enable pruning functionalities \[**Experimental option** \]Modify model and optimizer. + + +### Task request description + +- `script_url` (str): The URL to download the model archive. +- `optimized` (bool): If `True`, the model script has already be optimized by `Neural Coder`. +- `arguments` (List\[Union\[int, str\]\], optional): Arguments that are needed for running the model. +- `approach` (str, optional): The optimization approach supported by `Neural Coder`. +- `requirements` (List\[str\], optional): The environment requirements. +- `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. \ No newline at end of file From 2ed88fdc054751f3add9409af2c59b9d5a85d4c3 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 14:45:50 +0800 Subject: [PATCH 05/25] test Signed-off-by: Sun, Xuehao --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4020966..77f72cd 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,6 @@ - `arguments` (List\[Union\[int, str\]\], optional): Arguments that are needed for running the model. - `approach` (str, optional): The optimization approach supported by `Neural Coder`. - `requirements` (List\[str\], optional): The environment requirements. -- `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. \ No newline at end of file +- `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. + +## Design Doc for Optimization as a Service \[WIP\] \ No newline at end of file From e7922a0cc8d8964aadf4d38db23a3218dc0a4c64 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 16 Aug 2023 15:43:04 +0800 Subject: [PATCH 06/25] test Signed-off-by: Sun, Xuehao --- hello.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 85dd383..d5ed5ce 100644 --- a/hello.py +++ b/hello.py @@ -8,7 +8,10 @@ all should be the same.'.format( len(str1), len(str2), len(str3) ) - +def get_onnx_model(): + model = torchvision.models.resnet18() + x = Variable(torch.randn(1, 3, 224, 224)) + torch_out = torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) print("hello!!!") print("hello!p!!") print("test") From aba05fc329d7ab118a75aa565d0b224bbeca542f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 07:42:34 +0000 Subject: [PATCH 07/25] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index d5ed5ce..1ae33a4 100644 --- a/hello.py +++ b/hello.py @@ -11,7 +11,7 @@ def get_onnx_model(): model = torchvision.models.resnet18() x = Variable(torch.randn(1, 3, 224, 224)) - torch_out = torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) + torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) print("hello!!!") print("hello!p!!") print("test") From b6924cf682b04f19d6f756ba21eedb557daabad0 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 10:30:17 +0800 Subject: [PATCH 08/25] test Signed-off-by: Sun, Xuehao --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 77f72cd..c811648 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,7 @@ - `requirements` (List\[str\], optional): The environment requirements. - `priority`(int, optional): The importance of the task, the optional value is `1`, `2`, and `3`, `1` is the highest priority. -## Design Doc for Optimization as a Service \[WIP\] \ No newline at end of file +## Design Doc for Optimization as a Service \[WIP\] + +[intel® security center]: https://www.intel.com/security +[vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html \ No newline at end of file From c92768df358d47fb42014de23616a5a10db049f6 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 10:33:00 +0800 Subject: [PATCH 09/25] test Signed-off-by: Sun, Xuehao --- README.md | 11 ++++++++++- hello.py | 4 ---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c811648..06b961e 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,14 @@ ## Design Doc for Optimization as a Service \[WIP\] +# Security Policy + +## Report a Vulnerability + +Please report security issues or vulnerabilities to the [Intel® Security Center]. + +For more information on how Intel® works to resolve security issues, see +[Vulnerability Handling Guidelines]. + [intel® security center]: https://www.intel.com/security -[vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html \ No newline at end of file +[vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html diff --git a/hello.py b/hello.py index 1ae33a4..77a7df3 100644 --- a/hello.py +++ b/hello.py @@ -8,10 +8,6 @@ all should be the same.'.format( len(str1), len(str2), len(str3) ) -def get_onnx_model(): - model = torchvision.models.resnet18() - x = Variable(torch.randn(1, 3, 224, 224)) - torch.onnx.export(model, x, "resnet18.onnx", export_params=True, verbose=True) print("hello!!!") print("hello!p!!") print("test") From a4a6eb3c961c9dd6aa6edabc0837cf51a7cbd953 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 11:00:47 +0800 Subject: [PATCH 10/25] test Signed-off-by: Sun, Xuehao --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 06b961e..686d09e 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,6 @@ For more information on how Intel® works to resolve security issues, see [intel® security center]: https://www.intel.com/security [vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html + + +Model inference: Roughly speaking , two key steps are required to get the model's result. The first one is moving the model from the memory to the cache piece by piece, in which, memory bandwidth $B$ and parameter count $P$ are the key factors, theoretically the time cost is $P\*4 /B$. The second one is computation, in which, the device's computation capacity $C$ measured in FLOPS and the forward FLOPs $F$ play the key roles, theoretically the cost is $F/C$. \ No newline at end of file From 4963eda637de058ca63837a67974a9616f2f47bb Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 18 Aug 2023 11:14:25 +0800 Subject: [PATCH 11/25] test Signed-off-by: Sun, Xuehao --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 686d09e..fdea7a4 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,6 @@ For more information on how Intel® works to resolve security issues, see [vulnerability handling guidelines]: https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html -Model inference: Roughly speaking , two key steps are required to get the model's result. The first one is moving the model from the memory to the cache piece by piece, in which, memory bandwidth $B$ and parameter count $P$ are the key factors, theoretically the time cost is $P\*4 /B$. The second one is computation, in which, the device's computation capacity $C$ measured in FLOPS and the forward FLOPs $F$ play the key roles, theoretically the cost is $F/C$. \ No newline at end of file +Model inference: Roughly speaking , two key steps are required to get the model's result. The first one is moving the model from the memory to the cache piece by piece, in which, memory bandwidth $B$ and parameter count $P$ are the key factors, theoretically the time cost is $P\*4 /B$. The second one is computation, in which, the device's computation capacity $C$ measured in FLOPS and the forward FLOPs $F$ play the key roles, theoretically the cost is $F/C$. + +Text generation: The most famous application of LLMs is text generation, which predicts the next token/word based on the inputs/context. To generate a sequence of texts, we need to predict them one by one. In this scenario, $F\\approx P$ if some operations like bmm are ignored and past key values have been saved. However, the $C/B$ of the modern device could be to **100X,** that makes the memory bandwidth as the bottleneck in this scenario. \ No newline at end of file From d8a6a6586f59eb23dedba1f479a6eb0517e3336e Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 13:47:52 +0800 Subject: [PATCH 12/25] test Signed-off-by: Sun, Xuehao --- hello.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hello.py b/hello.py index 77a7df3..199110c 100644 --- a/hello.py +++ b/hello.py @@ -11,3 +11,4 @@ print("hello!!!") print("hello!p!!") print("test") +print("hello") From 3461c62c609db2c453c0bbe51fcd45b135f121d4 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 13:59:44 +0800 Subject: [PATCH 13/25] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 199110c..543d0ad 100644 --- a/hello.py +++ b/hello.py @@ -9,6 +9,6 @@ len(str1), len(str2), len(str3) ) print("hello!!!") -print("hello!p!!") +print("hello!!") print("test") print("hello") From 6a1048dc41a5f0e0cc0538f0d38acea94d44b6e3 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 14:06:54 +0800 Subject: [PATCH 14/25] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 543d0ad..1161f14 100644 --- a/hello.py +++ b/hello.py @@ -9,6 +9,6 @@ len(str1), len(str2), len(str3) ) print("hello!!!") -print("hello!!") +print("hello!") print("test") print("hello") From 2bcde729ece6bcd7ad517bbe408c4d3589c18de9 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 14:11:09 +0800 Subject: [PATCH 15/25] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 1161f14..83dd454 100644 --- a/hello.py +++ b/hello.py @@ -9,6 +9,6 @@ len(str1), len(str2), len(str3) ) print("hello!!!") -print("hello!") +print("hello") print("test") print("hello") From d7fd59257e0e9ad6be971fdb45012e167ed3e29f Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 14:18:08 +0800 Subject: [PATCH 16/25] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 83dd454..0c93ec0 100644 --- a/hello.py +++ b/hello.py @@ -8,7 +8,7 @@ all should be the same.'.format( len(str1), len(str2), len(str3) ) -print("hello!!!") +print("hello!!") print("hello") print("test") print("hello") From d2c567f0afceed14fec1cf00fb14b212fe3726fb Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 15:32:48 +0800 Subject: [PATCH 17/25] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 0c93ec0..dd2452f 100644 --- a/hello.py +++ b/hello.py @@ -8,7 +8,7 @@ all should be the same.'.format( len(str1), len(str2), len(str3) ) -print("hello!!") +print("hello") print("hello") print("test") print("hello") From b70d786dc81fa40e4a0ebb0045487068cd7b3da4 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 15:38:28 +0800 Subject: [PATCH 18/25] test Signed-off-by: Sun, Xuehao --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index dd2452f..7132b16 100644 --- a/hello.py +++ b/hello.py @@ -11,4 +11,4 @@ print("hello") print("hello") print("test") -print("hello") +print("hellogg") From 74572706ac81d19bbc349f574553c2e473628066 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 15:43:19 +0800 Subject: [PATCH 19/25] test Signed-off-by: Sun, Xuehao --- .github/workflows/probot.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/probot.yml diff --git a/.github/workflows/probot.yml b/.github/workflows/probot.yml new file mode 100644 index 0000000..49dd1cf --- /dev/null +++ b/.github/workflows/probot.yml @@ -0,0 +1,25 @@ +name: Probot + +on: + pull_request: + types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + required-jobs: + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + timeout-minutes: 61 # in case something is wrong with the internal timeout + steps: + - uses: XuehaoSun/probot@v5.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + job: check-group + interval: 180 # seconds + timeout: 60 # minutes + maintainers: "Lightning-AI/lai-frameworks" + owner: "carmocca" \ No newline at end of file From 606e28040f7a1dd8f6ca074807f02c8179d752ec Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 15:44:15 +0800 Subject: [PATCH 20/25] test Signed-off-by: Sun, Xuehao --- .github/workflows/probot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/probot.yml b/.github/workflows/probot.yml index 49dd1cf..eb91e25 100644 --- a/.github/workflows/probot.yml +++ b/.github/workflows/probot.yml @@ -14,7 +14,7 @@ jobs: if: github.event.pull_request.draft == false timeout-minutes: 61 # in case something is wrong with the internal timeout steps: - - uses: XuehaoSun/probot@v5.4 + - uses: XuehaoSun/probot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 9721e7578e251c101e276bdbd5c26cb5473dd24c Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 15:44:33 +0800 Subject: [PATCH 21/25] test Signed-off-by: Sun, Xuehao --- .github/workflows/probot.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/probot.yml b/.github/workflows/probot.yml index eb91e25..98cb0f6 100644 --- a/.github/workflows/probot.yml +++ b/.github/workflows/probot.yml @@ -20,6 +20,4 @@ jobs: with: job: check-group interval: 180 # seconds - timeout: 60 # minutes - maintainers: "Lightning-AI/lai-frameworks" - owner: "carmocca" \ No newline at end of file + timeout: 60 # minutes \ No newline at end of file From 4ea032689e29dad7678ecc5f7b25dba69b8e21a7 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 15:46:45 +0800 Subject: [PATCH 22/25] update Signed-off-by: Sun, Xuehao --- .github/workflows/probot.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/probot.yml b/.github/workflows/probot.yml index 98cb0f6..8904802 100644 --- a/.github/workflows/probot.yml +++ b/.github/workflows/probot.yml @@ -20,4 +20,6 @@ jobs: with: job: check-group interval: 180 # seconds - timeout: 60 # minutes \ No newline at end of file + timeout: 60 # minutes + maintainers: "XuehaoSun" + owner: "XuehaoSun" \ No newline at end of file From 831cb9d45df96ca11561b85bfa32788404e3f4f1 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 15:58:39 +0800 Subject: [PATCH 23/25] test Signed-off-by: Sun, Xuehao --- .github/workflows/probot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/probot.yml b/.github/workflows/probot.yml index 8904802..de0c05d 100644 --- a/.github/workflows/probot.yml +++ b/.github/workflows/probot.yml @@ -14,7 +14,7 @@ jobs: if: github.event.pull_request.draft == false timeout-minutes: 61 # in case something is wrong with the internal timeout steps: - - uses: XuehaoSun/probot + - uses: XuehaoSun/probot@0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 662fc489d26aaf9b37ba264bc19f6f3e3960d7b5 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 16:06:34 +0800 Subject: [PATCH 24/25] test Signed-off-by: Sun, Xuehao --- .github/probot-check-group.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/probot-check-group.yml diff --git a/.github/probot-check-group.yml b/.github/probot-check-group.yml new file mode 100644 index 0000000..2208ab1 --- /dev/null +++ b/.github/probot-check-group.yml @@ -0,0 +1,5 @@ +custom_service_name: "CI checker" +subprojects: + - id: "Tests workflow" + checks: + - "test / scan" From d0fcfa66f7d7fe4410db470cd3272d572e5f931c Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Thu, 22 Feb 2024 16:34:57 +0800 Subject: [PATCH 25/25] for test Signed-off-by: Sun, Xuehao --- .github/{probot-check-group.yml => checkgroupyml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{probot-check-group.yml => checkgroupyml} (100%) diff --git a/.github/probot-check-group.yml b/.github/checkgroupyml similarity index 100% rename from .github/probot-check-group.yml rename to .github/checkgroupyml