File tree Expand file tree Collapse file tree 4 files changed +13
-17
lines changed
Expand file tree Collapse file tree 4 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -49,26 +49,26 @@ jobs:
4949 HF_TOKEN : ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
5050 run : |
5151 cd benchmarks && python run_all.py
52- mkdir $BASE_PATH && mv *.csv $BASE_PATH
5352
5453 - name : Push results to the Hub
5554 env :
5655 HF_TOKEN : ${{ secrets.DIFFUSERS_BOT_TOKEN }}
57- run :
58- cd benchmarks && cp $BASE_PATH/collated_results.csv . && python push_results.py
56+ run : |
57+ cd benchmarks && python push_results.py
58+ mkdir $BASE_PATH && cp *.csv $BASE_PATH
5959
6060 - name : Test suite reports artifacts
6161 if : ${{ always() }}
6262 uses : actions/upload-artifact@v4
6363 with :
6464 name : benchmark_test_reports
65- path : benchmarks/benchmark_outputs
65+ path : benchmarks/$BASE_PATH
6666
6767 # TODO: enable this once the connection problem has been resolved.
6868 # - name: Update benchmarking results to DB
6969 # env:
7070 # PGDATABASE: metrics
71- # PGHOST: ${{ secrets.DIFFUSERS_BENCHMARKS_PGHOST }} # TODO
71+ # PGHOST: ${{ secrets.DIFFUSERS_BENCHMARKS_PGHOST }}
7272 # PGUSER: transformers_benchmarks
7373 # PGPASSWORD: ${{ secrets.DIFFUSERS_BENCHMARKS_PGPASSWORD }}
7474 # run: cd benchmarks && python populate_into_db.py
Original file line number Diff line number Diff line change 11import gc
22import inspect
3- import logging as std_logging
3+ import logging
44import os
55import queue
66import threading
1313import torch .utils .benchmark as benchmark
1414
1515from diffusers .models .modeling_utils import ModelMixin
16- from diffusers .utils import logging
1716from diffusers .utils .testing_utils import require_torch_gpu , torch_device
1817
1918
20- std_logging .basicConfig (level = std_logging .INFO , format = "%(asctime)s %(levelname)s %(name)s: %(message)s" )
21- logger = logging .get_logger (__name__ )
19+ logging .basicConfig (level = logging .INFO , format = "%(asctime)s %(levelname)s %(name)s: %(message)s" )
20+ logger = logging .getLogger (__name__ )
2221
2322
2423def benchmark_fn (f , * args , ** kwargs ):
Original file line number Diff line number Diff line change 77import psycopg2 .extras
88
99
10- # FINAL_CSV_FILENAME = "benchmark_outputs/ collated_results.csv"
10+ FINAL_CSV_FILENAME = "collated_results.csv"
1111# https://github.com/huggingface/transformers/blob/593e29c5e2a9b17baec010e8dc7c1431fed6e841/benchmark/init_db.sql#L27
1212TABLE_NAME = "model_measurements"
1313
2424 raise
2525 cur = conn .cursor ()
2626
27- # df = pd.read_csv(FINAL_CSV_FILENAME)
28- df = pd .read_csv ("collated_results.csv" )
27+ df = pd .read_csv (FINAL_CSV_FILENAME )
2928
3029 # Helper to cast values (or None) given a dtype
3130 def _cast_value (val , dtype : str ):
Original file line number Diff line number Diff line change 11import glob
2- import logging as std_logging
2+ import logging
33import os
44import subprocess
55
66import pandas as pd
77
8- from diffusers .utils import logging
98
10-
11- std_logging .basicConfig (level = std_logging .INFO , format = "%(asctime)s %(levelname)s %(name)s: %(message)s" )
12- logger = logging .get_logger (__name__ )
9+ logging .basicConfig (level = logging .INFO , format = "%(asctime)s %(levelname)s %(name)s: %(message)s" )
10+ logger = logging .getLogger (__name__ )
1311
1412PATTERN = "benchmarking_*.py"
1513FINAL_CSV_FILENAME = "collated_results.py"
You can’t perform that action at this time.
0 commit comments