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:
49
49
HF_TOKEN : ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
50
50
run : |
51
51
cd benchmarks && python run_all.py
52
- mkdir $BASE_PATH && mv *.csv $BASE_PATH
53
52
54
53
- name : Push results to the Hub
55
54
env :
56
55
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
59
59
60
60
- name : Test suite reports artifacts
61
61
if : ${{ always() }}
62
62
uses : actions/upload-artifact@v4
63
63
with :
64
64
name : benchmark_test_reports
65
- path : benchmarks/benchmark_outputs
65
+ path : benchmarks/$BASE_PATH
66
66
67
67
# TODO: enable this once the connection problem has been resolved.
68
68
# - name: Update benchmarking results to DB
69
69
# env:
70
70
# PGDATABASE: metrics
71
- # PGHOST: ${{ secrets.DIFFUSERS_BENCHMARKS_PGHOST }} # TODO
71
+ # PGHOST: ${{ secrets.DIFFUSERS_BENCHMARKS_PGHOST }}
72
72
# PGUSER: transformers_benchmarks
73
73
# PGPASSWORD: ${{ secrets.DIFFUSERS_BENCHMARKS_PGPASSWORD }}
74
74
# run: cd benchmarks && python populate_into_db.py
Original file line number Diff line number Diff line change 1
1
import gc
2
2
import inspect
3
- import logging as std_logging
3
+ import logging
4
4
import os
5
5
import queue
6
6
import threading
13
13
import torch .utils .benchmark as benchmark
14
14
15
15
from diffusers .models .modeling_utils import ModelMixin
16
- from diffusers .utils import logging
17
16
from diffusers .utils .testing_utils import require_torch_gpu , torch_device
18
17
19
18
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__ )
22
21
23
22
24
23
def benchmark_fn (f , * args , ** kwargs ):
Original file line number Diff line number Diff line change 7
7
import psycopg2 .extras
8
8
9
9
10
- # FINAL_CSV_FILENAME = "benchmark_outputs/ collated_results.csv"
10
+ FINAL_CSV_FILENAME = "collated_results.csv"
11
11
# https://github.com/huggingface/transformers/blob/593e29c5e2a9b17baec010e8dc7c1431fed6e841/benchmark/init_db.sql#L27
12
12
TABLE_NAME = "model_measurements"
13
13
24
24
raise
25
25
cur = conn .cursor ()
26
26
27
- # df = pd.read_csv(FINAL_CSV_FILENAME)
28
- df = pd .read_csv ("collated_results.csv" )
27
+ df = pd .read_csv (FINAL_CSV_FILENAME )
29
28
30
29
# Helper to cast values (or None) given a dtype
31
30
def _cast_value (val , dtype : str ):
Original file line number Diff line number Diff line change 1
1
import glob
2
- import logging as std_logging
2
+ import logging
3
3
import os
4
4
import subprocess
5
5
6
6
import pandas as pd
7
7
8
- from diffusers .utils import logging
9
8
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__ )
13
11
14
12
PATTERN = "benchmarking_*.py"
15
13
FINAL_CSV_FILENAME = "collated_results.py"
You can’t perform that action at this time.
0 commit comments