Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLM: add the comparison between latest arc perf test and last one #9296

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/llm_performance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ jobs:
export https_proxy=${HTTPS_PROXY}
python run.py
curl -T ./*.csv ${LLM_FTP_URL}/llm/ggml-actions/perf/
cp ./*.csv /mnt/disk1/nightly_perf/
cd ../../../test/benchmark
python csv_to_html.py -f ../../dev/benchmark/all-in-one
cp ./*.html /mnt/disk1/nightly_perf/
python csv_to_html.py -f /mnt/disk1/nightly_perf/
25 changes: 23 additions & 2 deletions python/llm/test/benchmark/csv_to_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,37 @@
def main():
parser = argparse.ArgumentParser(description="convert .csv file to .html file")
parser.add_argument("-f", "--folder_path", type=str, dest="folder_path",
help="The directory which stores the .csv file", default="../../dev/benchmark/all-in-one")
help="The directory which stores the .csv file", default="/mnt/disk1/nightly_perf/")
args = parser.parse_args()

csv_files = []
for file_name in os.listdir(args.folder_path):
file_path = os.path.join(args.folder_path, file_name)
if os.path.isfile(file_path) and file_name.endswith(".csv"):
csv_files.append(file_path)
csv_files.sort(reverse=True)

a = pd.read_csv(csv_files[0], index_col=0).to_html(csv_files[0].split("/")[-1].split(".")[0]+".html")
if len(csv_files)<=1:
pd.read_csv(csv_files[0], index_col=0).to_html(csv_files[0].split("/")[-1].split(".")[0]+".html")
WeiguangHan marked this conversation as resolved.
Show resolved Hide resolved
WeiguangHan marked this conversation as resolved.
Show resolved Hide resolved
else:
data1 = pd.read_csv(csv_files[0], index_col=0)
data2 = pd.read_csv(csv_files[1], index_col=0)

origin_column_1='1st token avg latency (ms)'
origin_column_2='2+ avg latency (ms/token)'

added_column_1='last1'
added_column_2='diff1(%)'

added_column_3='last2'
added_column_4='diff2(%)'

data1.insert(loc=3,column=added_column_1,value=data2[origin_column_1])
data1.insert(loc=4,column=added_column_2,value=round((data2[origin_column_1]-data1[origin_column_1])*100/data2[origin_column_1],2))
data1.insert(loc=5,column=added_column_3,value=data2[origin_column_2])
data1.insert(loc=6,column=added_column_4,value=round((data2[origin_column_2]-data1[origin_column_2])*100/data2[origin_column_2],2))
daily_html=csv_files[0].split(".")[0]+".html"
WeiguangHan marked this conversation as resolved.
Show resolved Hide resolved
data1.to_html(daily_html)

if __name__ == "__main__":
sys.exit(main())
Loading