Skip to content

Commit

Permalink
rename output param csv filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
qishipengqsp committed Oct 17, 2024
1 parent 570c508 commit f6287be
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions paramgen/parameter_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def process_iter_queries(query_id):
else:
amount_bucket_path = os.path.join(table_dir, 'trans_withdraw_bucket')
time_bucket_path = os.path.join(table_dir, 'trans_withdraw_month')
output_path = os.path.join(out_dir, 'tcr8.txt')
output_path = os.path.join(out_dir, 'complex_8_param.csv')
steps = 2

elif query_id == 1:
Expand All @@ -356,7 +356,7 @@ def process_iter_queries(query_id):
else:
amount_bucket_path = os.path.join(table_dir, 'transfer_out_bucket')
time_bucket_path = os.path.join(table_dir, 'transfer_out_month')
output_path = os.path.join(out_dir, 'tcr1.txt')
output_path = os.path.join(out_dir, 'complex_1_param.csv')
steps = 2

elif query_id == 5:
Expand All @@ -378,7 +378,7 @@ def process_iter_queries(query_id):
else:
amount_bucket_path = os.path.join(table_dir, 'transfer_in_bucket')
time_bucket_path = os.path.join(table_dir, 'transfer_in_month')
output_path = os.path.join(out_dir, 'tcr2.txt')
output_path = os.path.join(out_dir, 'complex_2_param.csv')
steps = 3

elif query_id == 3:
Expand All @@ -394,7 +394,7 @@ def process_iter_queries(query_id):
account_account_path = os.path.join(table_dir, 'person_guarantee_list')
amount_bucket_path = os.path.join(table_dir, 'person_guarantee_count')
time_bucket_path = os.path.join(table_dir, 'person_guarantee_month')
output_path = os.path.join(out_dir, 'tcr11.txt')
output_path = os.path.join(out_dir, 'complex_11_param.csv')
steps = 3

first_account_df = process_csv(first_account_path)
Expand Down Expand Up @@ -474,14 +474,14 @@ def process_iter_queries(query_id):

elif query_id == 5:
csvWriter_5 = CSVSerializer()
csvWriter_5.setOutputFile(output_path + 'tcr5.txt')
csvWriter_5.setOutputFile(output_path + 'complex_5_param.csv')
csvWriter_5.registerHandler(hendleIdParam, final_first_items, "id")
csvWriter_5.registerHandler(handleTimeDurationParam, time_list, "startTime|endTime")
csvWriter_5.registerHandler(handleTruncateLimitParam, truncate_limit_list, "truncationLimit")
csvWriter_5.registerHandler(handleTruncateOrderParam, truncate_order_list, "truncationOrder")

csvWriter_12 = CSVSerializer()
csvWriter_12.setOutputFile(output_path + 'tcr12.txt')
csvWriter_12.setOutputFile(output_path + 'complex_12_param.csv')
csvWriter_12.registerHandler(hendleIdParam, final_first_items, "id")
csvWriter_12.registerHandler(handleTimeDurationParam, time_list, "startTime|endTime")
csvWriter_12.registerHandler(handleTruncateLimitParam, truncate_limit_list, "truncationLimit")
Expand Down Expand Up @@ -519,15 +519,15 @@ def process_iter_queries(query_id):
final_second_items_4.append(final_first_items[k])

csvWriter_3 = CSVSerializer()
csvWriter_3.setOutputFile(output_path + 'tcr3.txt')
csvWriter_3.setOutputFile(output_path + 'complex_3_param.csv')
csvWriter_3.registerHandler(hendleIdParam, final_first_items, "id1")
csvWriter_3.registerHandler(hendleIdParam, final_second_items_3, "id2")
csvWriter_3.registerHandler(handleTimeDurationParam, time_list, "startTime|endTime")
csvWriter_3.registerHandler(handleTruncateLimitParam, truncate_limit_list, "truncationLimit")
csvWriter_3.registerHandler(handleTruncateOrderParam, truncate_order_list, "truncationOrder")

csvWriter_4 = CSVSerializer()
csvWriter_4.setOutputFile(output_path + 'tcr4.txt')
csvWriter_4.setOutputFile(output_path + 'complex_4_param.csv')
csvWriter_4.registerHandler(hendleIdParam, final_first_items, "id1")
csvWriter_4.registerHandler(hendleIdParam, final_second_items_4, "id2")
csvWriter_4.registerHandler(handleTimeDurationParam, time_list, "startTime|endTime")
Expand Down Expand Up @@ -559,7 +559,7 @@ def process_1_hop_query(query_id):
elif query_id == 10:
first_count_path = os.path.join(table_dir, 'person_invest_company')
time_bucket_path = os.path.join(table_dir, 'invest_month')
output_path = os.path.join(out_dir, 'tcr10.txt')
output_path = os.path.join(out_dir, 'complex_10_param.csv')

first_count_df = process_csv(first_count_path)
time_bucket_df = process_csv(time_bucket_path)
Expand All @@ -579,15 +579,15 @@ def process_1_hop_query(query_id):
if query_id == 7:

csvWriter_7 = CSVSerializer()
csvWriter_7.setOutputFile(output_path + 'tcr7.txt')
csvWriter_7.setOutputFile(output_path + 'complex_7_param.csv')
csvWriter_7.registerHandler(hendleIdParam, final_first_items, "id")
csvWriter_7.registerHandler(handleThresholdParam, thresh_list, "threshold")
csvWriter_7.registerHandler(handleTimeDurationParam, time_list, "startTime|endTime")
csvWriter_7.registerHandler(handleTruncateLimitParam, truncate_limit_list, "truncationLimit")
csvWriter_7.registerHandler(handleTruncateOrderParam, truncate_order_list, "truncationOrder")

csvWriter_9 = CSVSerializer()
csvWriter_9.setOutputFile(output_path + 'tcr9.txt')
csvWriter_9.setOutputFile(output_path + 'complex_9_param.csv')
csvWriter_9.registerHandler(hendleIdParam, final_first_items, "id")
csvWriter_9.registerHandler(handleThresholdParam, thresh_list, "threshold")
csvWriter_9.registerHandler(handleTimeDurationParam, time_list, "startTime|endTime")
Expand Down Expand Up @@ -627,7 +627,7 @@ def process_withdraw_query():
else:
withdraw_bucket_path = os.path.join(table_dir, 'withdraw_in_bucket')
transfer_bucket_path = os.path.join(table_dir, 'transfer_in_bucket')
output_path = os.path.join(out_dir, 'tcr6.txt')
output_path = os.path.join(out_dir, 'complex_6_param.csv')

first_account_df = process_csv(first_account_path)
time_bucket_df = process_csv(time_bucket_path)
Expand Down

0 comments on commit f6287be

Please sign in to comment.