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):
128128 idx = 0
129129 progress_size = 100
130130 amount = len (record_dict_list )
131- __print_progress (0.0 )
131+ current_progress = 0.0
132+ __print_progress (current_progress )
132133
133134 async def process_llm_record_batch (record_dict_batch : list ):
134135 """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):
148149 )
149150 calculated_attribute_by_record_id [record_dict ["id" ]] = attr_value
150151
152+ global current_progress
153+ current_progress = current_progress + len (record_dict_batch ) / amount
154+ __print_progress (round (current_progress , 2 ))
155+
151156 async def process_async_llm_calls (record_dict_list ):
152157 batch_size = max (
153158 len (record_dict_list ) // int (attribute_calculators .NUM_WORKERS_A2VYBG ), 1
You can’t perform that action at this time.
0 commit comments