File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,8 @@ def parse_data_to_record_dict(record_chunk):
128
128
idx = 0
129
129
progress_size = 100
130
130
amount = len (record_dict_list )
131
- __print_progress (0.0 )
131
+ current_progress = 0.0
132
+ __print_progress (current_progress )
132
133
133
134
async def process_llm_record_batch (record_dict_batch : list ):
134
135
"""Process a batch of record_dicts, writes results into shared var calculated_attribute_by_record_id."""
@@ -148,6 +149,10 @@ async def process_llm_record_batch(record_dict_batch: list):
148
149
)
149
150
calculated_attribute_by_record_id [record_dict ["id" ]] = attr_value
150
151
152
+ global current_progress
153
+ current_progress = current_progress + len (record_dict_batch ) / amount
154
+ __print_progress (round (current_progress , 2 ))
155
+
151
156
async def process_async_llm_calls (record_dict_list ):
152
157
batch_size = max (
153
158
len (record_dict_list ) // int (attribute_calculators .NUM_WORKERS_A2VYBG ), 1
You can’t perform that action at this time.
0 commit comments