From be1e53bb08649844e84d09cc8fb909485062999b Mon Sep 17 00:00:00 2001 From: workpc Date: Tue, 11 Feb 2025 09:46:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=9A=E7=83=AF=E7=83=83=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config_juxiting.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/config_juxiting.py b/config_juxiting.py index d04ba48..3482d44 100644 --- a/config_juxiting.py +++ b/config_juxiting.py @@ -213,7 +213,7 @@ upload_data = { ### 开关 -is_train = True # 是否训练 +is_train = False # 是否训练 is_debug = False # 是否调试 is_eta = True # 是否使用eta接口 is_timefurture = True # 是否使用时间特征 @@ -226,6 +226,12 @@ is_del_corr = 0 # 是否删除相关性高的特征,取值为 0-1 ,0 为不删 +# 连接到数据库 +db_mysql = MySQLDB(host=host, user=dbusername, password=password, database=dbname) +db_mysql.connect() +print("数据库连接成功",host,dbname,dbusername) + + # 数据截取日期 end_time = '' # 数据截取日期 freq = 'B' # 时间频率,"D": 天 "W": 周"M": 月"Q": 季度"A": 年 "H": 小时 "T": 分钟 "S": 秒 "B": 工作日 @@ -267,8 +273,9 @@ data_set = 'PP指标数据.xlsx' # 数据集文件 dataset = 'juxitingdataset' # 数据集文件夹 # 数据库名称 -db_name = os.path.join(dataset,'jbsh_juxiting.db') - +db_name = os.path.join(dataset,'jbsh_yuanyou.db') +sqlitedb = SQLiteHandler(db_name) +sqlitedb.connect() settings = f'{input_size}-{horizon}-{train_steps}--{k}-{data_set}-{y}' # 获取日期时间 @@ -279,7 +286,7 @@ reportname = reportname.replace(':', '-') # 替换冒号 ### 邮件配置 username='1321340118@qq.com' passwd='wgczgyhtyyyyjghi' -# recv=['liurui_test@163.com','52585119@qq.com'] +# recv=['liurui_test@163.com'] recv=['liurui_test@163.com'] title=reportname content=y+'预测报告请看附件'