From b214d4f90f6896543d2258ae33fadabd53a8bfa5 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Sun, 4 Feb 2024 10:24:59 +0800 Subject: [PATCH 1/3] for test Signed-off-by: Sun, Xuehao --- .github/workflows/pr_agent.yml | 18 ++++++++++++++++++ neural_compressor/model/model.py | 9 +++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/pr_agent.yml diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml new file mode 100644 index 00000000000..19d02248c6e --- /dev/null +++ b/.github/workflows/pr_agent.yml @@ -0,0 +1,18 @@ +on: + pull_request: + issue_comment: +jobs: + pr_agent_job: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + contents: write + name: Run pr agent on every pull request, respond to user comments + steps: + - name: PR Agent action step + id: pragent + uses: Codium-ai/pr-agent@main + env: + OPENAI_KEY: ${{ secrets.OPENAI_KEY }} + GITHUB_TOKEN: ${{ secrets.GHA_TOKEN }} diff --git a/neural_compressor/model/model.py b/neural_compressor/model/model.py index 06362d2d0d8..b08c1833564 100644 --- a/neural_compressor/model/model.py +++ b/neural_compressor/model/model.py @@ -66,6 +66,15 @@ } +def test(x): + return x**2 + 1 + + +import random +test(random.randint(1,100)) + + + def get_model_fwk_name(model): """Detect the input model belongs to which framework. From 740782f1e23b6fccdbf9e9f68a5ec0b0f6e5785a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 02:26:38 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- neural_compressor/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neural_compressor/model/model.py b/neural_compressor/model/model.py index b08c1833564..551d01bf0f4 100644 --- a/neural_compressor/model/model.py +++ b/neural_compressor/model/model.py @@ -71,8 +71,8 @@ def test(x): import random -test(random.randint(1,100)) +test(random.randint(1, 100)) def get_model_fwk_name(model): From 07c508a74f77931a58570a0e2d0fffb661f18e0c Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Sun, 4 Feb 2024 10:35:10 +0800 Subject: [PATCH 3/3] test Signed-off-by: Sun, Xuehao --- neural_compressor/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neural_compressor/model/model.py b/neural_compressor/model/model.py index 551d01bf0f4..e18e96e9f43 100644 --- a/neural_compressor/model/model.py +++ b/neural_compressor/model/model.py @@ -72,7 +72,7 @@ def test(x): import random -test(random.randint(1, 100)) +test(random.randint(1, 1000)) def get_model_fwk_name(model):