You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
847 B

import logging
import sys
from components.ai_check import process_jsonl_file
# 调用方法
# python3 step1_ai1.py parent_path output_path file_path file_index
parent_path = sys.argv[1]
file_path = sys.argv[2]
file_index = sys.argv[3]
# 配置日志记录器
logging.basicConfig(
level=logging.DEBUG, # 设置日志级别为 DEBUG(最低级别)
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', # 日志格式
filename=parent_path+"/log/ai1_log_"+str(file_index)+'.log', # 将日志写入文件
filemode='a' # 写入模式('w' 表示覆盖,'a' 表示追加)
)
# 创建日志记录器
logger = logging.getLogger(__name__)
if __name__ == '__main__':
# # 读取数据文件
print("Start")
temp_filepath = file_path
process_jsonl_file(temp_filepath,parent_path+"/ai_1",logger=logger)