From e2aa8e151c6294dcb8560b22b28e65c4b687473b Mon Sep 17 00:00:00 2001 From: quyuan Date: Wed, 3 Jul 2024 11:50:38 +0800 Subject: [PATCH 1/3] update ci --- tests/test_cli/conf/conf.py | 2 +- tools/benchmark.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/test_cli/conf/conf.py b/tests/test_cli/conf/conf.py index 573c7c5c..0fd916f4 100644 --- a/tests/test_cli/conf/conf.py +++ b/tests/test_cli/conf/conf.py @@ -2,7 +2,7 @@ import os conf = { "code_path": os.environ.get('GITHUB_WORKSPACE'), "pdf_dev_path" : os.environ.get('GITHUB_WORKSPACE') + "/tests/test_cli/pdf_dev", -"pdf_res_path": "/home/quyuan/code/Magic-PDF/Magic-PDF/Magic-PDF/ci" +"pdf_res_path": "/share/quyuan/mineru/data/mineru" } diff --git a/tools/benchmark.py b/tools/benchmark.py index 3a3b41b0..5efebe98 100644 --- a/tools/benchmark.py +++ b/tools/benchmark.py @@ -4,15 +4,13 @@ import shutil import json import markdown_calculate code_path = os.environ.get('GITHUB_WORKSPACE') -#code_path = "/home/quyuan/actions-runner/_work/Magic-PDF/Magic-PDF.bk" -#评测集存放路径 -pdf_dev_path = "/home/quyuan/data" -#magicpdf跑测结果 -pdf_res_path = "/home/quyuan/code/Magic-PDF/Magic-PDF/Magic-PDF/ci/magic-pdf" +#数据集存放路径 +pdf_dev_path = "/share/quyuan/mineru/data/" +#magicpdf最终结果 +pdf_res_path = "/share/quyuan/mineru/data/mineru" file_types = ["academic_literature", "atlas", "courseware", "colorful_textbook", "historical_documents", "notes", "ordinary_books", "ordinary_exam_paper", "ordinary_textbook", "research_report", "special_exam_paper"] -#file_types = ["academic_literature"] - def test_cli(): + #magicpdf模型输出结果 magicpdf_path = os.path.join(pdf_dev_path, "output") rm_cmd = "rm -rf %s" % (pdf_res_path) os.system(rm_cmd) From 50319a7580ebad1489112b344dbd7cf961303c6a Mon Sep 17 00:00:00 2001 From: quyuan Date: Wed, 3 Jul 2024 11:58:25 +0800 Subject: [PATCH 2/3] update ci --- .github/workflows/benchmark.yml | 4 ++-- .github/workflows/cli.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 600ad890..23951000 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: PDF +name: mineru on: push: branches: @@ -18,7 +18,7 @@ on: workflow_dispatch: jobs: pdf-test: - runs-on: pdf + runs-on: mineru timeout-minutes: 180 strategy: fail-fast: true diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index ea3f6db2..0a15eab2 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: PDF +name: mineru on: push: branches: @@ -18,7 +18,7 @@ on: workflow_dispatch: jobs: cli-test: - runs-on: pdf + runs-on: mineru timeout-minutes: 40 strategy: fail-fast: true @@ -53,7 +53,7 @@ jobs: notify_to_feishu: if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'master') }} needs: [cli-test] - runs-on: pdf + runs-on: mineru steps: - name: get_actor run: | From 89fe33b20ec5173fd40341bd3c1b5faa0bd40c00 Mon Sep 17 00:00:00 2001 From: quyuan Date: Wed, 3 Jul 2024 12:00:06 +0800 Subject: [PATCH 3/3] update ci --- .github/workflows/benchmark.yml | 6 +----- .github/workflows/cli.yml | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 23951000..c30dc32e 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -37,12 +37,8 @@ jobs: echo $changed_files if [[ $changed_files =~ "requirements.txt" ]]; then pip install -r requirements.txt + pip install -r requirements-qa.txt fi - - - name: config-net-reset - run: | - export http_proxy="" - export https_proxy="" - name: get-benchmark-result run: | echo "start test" diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 0a15eab2..bf774f46 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -38,6 +38,7 @@ jobs: echo $changed_files if [[ $changed_files =~ "requirements.txt" ]]; then pip install -r requirements.txt + pip install -r requirements-qa.txt fi - name: config-net-reset