@@ -90,6 +90,7 @@ def __init__(
90
90
# database.
91
91
self ._tru .reset_database ()
92
92
93
+ total_existing_queries = 0
93
94
for dataset in datasets :
94
95
queries , golden_set = dataset .get_queries_and_golden_set ()
95
96
if self .sample_percent < 1.0 :
@@ -105,6 +106,8 @@ def __init__(
105
106
app_ids = [dataset .name ]
106
107
)
107
108
existing_queries = existing_records ["input" ].dropna ().tolist ()
109
+ total_existing_queries += len (existing_queries )
110
+
108
111
queries = [query for query in queries if query not in existing_queries ]
109
112
110
113
self ._queries [dataset .name ] = queries
@@ -114,6 +117,9 @@ def __init__(
114
117
metric_count = 4
115
118
self ._total_feedbacks = self ._total_queries * metric_count
116
119
120
+ # Set finished queries count to total existing queries
121
+ self ._finished_queries = total_existing_queries
122
+
117
123
def signal_handler (self , _ , __ ):
118
124
"""Handle SIGINT signal."""
119
125
self ._sigint_received = True
@@ -202,7 +208,10 @@ def query(self):
202
208
"(r)unning, (w)aiting, (f)ailed, (s)kipped"
203
209
)
204
210
205
- self ._progress = tqdm (total = (self ._total_queries + self ._total_feedbacks ))
211
+ self ._progress = tqdm (
212
+ total = (self ._total_queries + self ._total_feedbacks ),
213
+ initial = self ._finished_queries ,
214
+ )
206
215
207
216
for dataset_name in self ._queries :
208
217
feedback_functions = [
0 commit comments