quyuan 1 年之前
父節點
當前提交
3400a661e2
共有 3 個文件被更改,包括 3 次插入4 次删除
  1. 2 1
      .github/workflows/benchmark.yml
  2. 0 3
      tools/ocr_badcase.py
  3. 1 0
      tools/text_badcase.py

+ 2 - 1
.github/workflows/benchmark.yml

@@ -44,7 +44,8 @@ jobs:
     - name: benchmark
       run: |
         echo "start test"
-        cd tools && python ocr_badcase.py pdf_json_label_0306.json ocr_dataset.json json_files.zip badcase.json overall.json base_data.json
+        cd tools && python text_badcase.py pdf_json_label_0306.json pdf_json_label_0229.json json_files.zip text_badcase text_overall base_data_text.json --s3_bucket_name llm-process-pperf --s3_file_directory qa-validate/pdf-datasets/badcase --AWS_ACCESS_KEY 7X9CWNHIVOHH3LXRD5WK  --AWS_SECRET_KEY IHLyTsv7h4ArzReLWUGZNKvwqB7CMrRi6e7ZyUt0 --END_POINT_URL http://p-ceph-norm-outside.pjlab.org.cn:80
+        cd tools && python ocr_badcase.py pdf_json_label_0306.json ocr_dataset.json json_files.zip ocr_badcase ocr_overall base_data_ocr.json --s3_bucket_name llm-process-pperf --s3_file_directory qa-validate/pdf-datasets/badcase --AWS_ACCESS_KEY 7X9CWNHIVOHH3LXRD5WK  --AWS_SECRET_KEY IHLyTsv7h4ArzReLWUGZNKvwqB7CMrRi6e7ZyUt0 --END_POINT_URL http://p-ceph-norm-outside.pjlab.org.cn:80
   notify_to_feishu:
     if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'master') }}
     needs: [pdf-test]

+ 0 - 3
tools/ocr_badcase.py

@@ -867,7 +867,6 @@ def main(standard_file, test_file, zip_file, badcase_path, overall_path,base_dat
     save_results(result_dict, overall_report_dict,badcase_file,overall_file)
 
     result=compare_edit_distance(base_data_path, overall_report_dict)
-<<<<<<< HEAD
 
     if all([s3_bucket_name, s3_file_directory, aws_access_key, aws_secret_key, end_point_url]):
         try:
@@ -875,8 +874,6 @@ def main(standard_file, test_file, zip_file, badcase_path, overall_path,base_dat
             upload_to_s3(overall_file, s3_bucket_name, s3_file_directory, aws_access_key, aws_secret_key, end_point_url)
         except Exception as e:
             print(f"上传到S3时发生错误: {e}")
-=======
->>>>>>> ff8f62aa3c28facc192104387f131d87978064fc
     print(result)
     assert result == 1
 

+ 1 - 0
tools/text_badcase.py

@@ -886,6 +886,7 @@ def main(standard_file, test_file, zip_file, badcase_path, overall_path,base_dat
         except Exception as e:
             print(f"上传到S3时发生错误: {e}")
     print(result)
+    assert result == 1
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(description="主函数,执行整个评估流程。")