Skip to content

Commit

Permalink
plt add nlp case, test=model
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeref996 committed Dec 9, 2024
1 parent 66ca341 commit c716b9a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions framework/e2e/PaddleLT_new/TestingReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import json
from pltools.res_save import xlsx_save
from pltools.logger import Logger
from pltools.upload_bos import UploadBos
from db.layer_db import LayerBenchmarkDB
from db.info_map import precision_md5, precision_flags, performance_md5

Expand Down Expand Up @@ -38,6 +39,8 @@ def __init__(self, task_list=list(precision_md5.keys()), date_interval=None):
self.date_interval = date_interval
self.logger.get_log().info(f"self.date_interval: {self.date_interval}")

self.AGILE_PIPELINE_BUILD_ID = os.environ.get("AGILE_PIPELINE_BUILD_ID", 0)

def get_fail_case_info(self):
"""
获取失败case信息
Expand Down Expand Up @@ -169,6 +172,14 @@ def binary_search(self, fail_dict, loop_num=1):
# print("commit list is: {}".format(commit_list))
# print("commit list origin is: {}".format(commit_list_origin))

def _bs_upload(self):
"""二分结果上传bos"""
bos_path = f"PaddleLT/PaddleLTBenchmark/binary_search/build_{self.AGILE_PIPELINE_BUILD_ID}"
excel_file = "binary_search_result.xlsx"
if os.path.exists(excel_file):
UploadBos().upload_to_bos(bos_path="paddle-qa/{}".format(bos_path), file_path=excel_file)
self.logger.get_log().info("表格下载链接: https://paddle-qa.bj.bcebos.com/{}/{}".format(bos_path, excel_file))


if __name__ == "__main__":
import argparse
Expand All @@ -188,5 +199,6 @@ def binary_search(self, fail_dict, loop_num=1):
# exit(0)
# 打印出commit定位结果
res_dict = reporter.binary_search(fail_dict=relative_fail_dict, loop_num=args.loop_num)
reporter._bs_upload()
print("binary search end")
print(f"res_dict:{res_dict}")

0 comments on commit c716b9a

Please sign in to comment.