From c49929019614b2b78ef2296c7c7761d53fe664bb Mon Sep 17 00:00:00 2001 From: liurui Date: Tue, 5 Nov 2024 15:38:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3sqlite=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config_jingbo.py | 8 ++++---- dataset/jbsh_yuanyou.db | Bin 65536 -> 65536 bytes main.py | 39 ++++++++++++++++++++------------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/config_jingbo.py b/config_jingbo.py index db3255d..38ba7fd 100644 --- a/config_jingbo.py +++ b/config_jingbo.py @@ -167,12 +167,12 @@ upload_data = { ### 开关 is_train = True # 是否训练 -is_debug = True # 是否调试 +is_debug = False # 是否调试 is_eta = False # 是否使用eta接口 is_timefurture = True # 是否使用时间特征 -is_fivemodels = True # 是否使用之前保存的最佳的5个模型 -is_edbcode = True # 特征使用edbcoding列表中的 -is_edbnamelist = True # 自定义特征,对应上面的edbnamelist +is_fivemodels = False # 是否使用之前保存的最佳的5个模型 +is_edbcode = False # 特征使用edbcoding列表中的 +is_edbnamelist = False # 自定义特征,对应上面的edbnamelist is_update_eta = False # 预测结果上传到eta is_update_report = False # 是否上传报告 diff --git a/dataset/jbsh_yuanyou.db b/dataset/jbsh_yuanyou.db index 0ee3db30e52c10836f4a14c1f0e2c8824837083f..d5cfb0d5c78afd8cbf3fba422dfbc98cec8dd5fc 100644 GIT binary patch delta 72 zcmZo@U}7PO5`JD*UIqrfyZoAb%)BPNn*{~l^Dr5)PQEWED{81~ ZV5(qXU_QUK0ksyZoAb%)BO>1r=0yH=D?wc?1Cb84Jk( diff --git a/main.py b/main.py index b9c32cc..d11f3ce 100644 --- a/main.py +++ b/main.py @@ -65,6 +65,7 @@ def predict_main(): else: for row in first_row.itertuples(index=False): row_dict = row._asdict() + row_dict['ds'] = row_dict['ds'].strftime('%Y-%m-%d %H:%M:%S') check_query = sqlitedb.select_data('trueandpredict',where_condition = f"ds = '{row.ds}'") if len(check_query) > 0: set_clause = ", ".join([f"{key} = '{value}'" for key, value in row_dict.items()]) @@ -117,25 +118,25 @@ def predict_main(): row,col = df.shape now = datetime.datetime.now().strftime('%Y%m%d%H%M%S') - # ex_Model(df, - # horizon=horizon, - # input_size=input_size, - # train_steps=train_steps, - # val_check_steps=val_check_steps, - # early_stop_patience_steps=early_stop_patience_steps, - # is_debug=is_debug, - # dataset=dataset, - # is_train=is_train, - # is_fivemodels=is_fivemodels, - # val_size=val_size, - # test_size=test_size, - # settings=settings, - # now=now, - # etadata = etadata, - # modelsindex = modelsindex, - # data = data, - # is_eta=is_eta, - # ) + ex_Model(df, + horizon=horizon, + input_size=input_size, + train_steps=train_steps, + val_check_steps=val_check_steps, + early_stop_patience_steps=early_stop_patience_steps, + is_debug=is_debug, + dataset=dataset, + is_train=is_train, + is_fivemodels=is_fivemodels, + val_size=val_size, + test_size=test_size, + settings=settings, + now=now, + etadata = etadata, + modelsindex = modelsindex, + data = data, + is_eta=is_eta, + ) # # 模型评估 model_results3 = model_losss(sqlitedb)