David 1 tháng trước cách đây
mục cha
commit
0338e5ffad

+ 89 - 0
app/logs/2025-03-25/south-forecast.2025-03-25.0.log

@@ -0,0 +1,89 @@
+2025-03-25 08:48:02,492 - module_wrapper.py - WARNING - From E:\compete\app\model\losses.py:10: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.
+ - _tfmw_add_deprecation_warning
+2025-03-25 08:48:02,832 - tf_lstm_train.py - INFO - Program starts execution! - model_training
+2025-03-25 08:48:02,886 - data_cleaning.py - INFO - 开始清洗:训练集…… - cleaning
+2025-03-25 08:48:02,895 - data_cleaning.py - INFO - 列清洗:清洗的列有:{'HubSpeed', 'HubDireciton'} - data_column_cleaning
+2025-03-25 08:48:02,913 - data_cleaning.py - INFO - 行清洗:清洗的行数有:881,缺失的列有: - key_field_row_cleaning
+2025-03-25 08:48:02,933 - data_handler.py - INFO - 2022-05-05 23:45:00 ~ 2022-05-09 00:00:00 - missing_time_splite
+2025-03-25 08:48:02,933 - data_handler.py - INFO - 缺失点数:288.0 - missing_time_splite
+2025-03-25 08:48:02,966 - data_handler.py - INFO - 2022-06-25 07:45:00 ~ 2022-06-25 08:15:00 - missing_time_splite
+2025-03-25 08:48:02,966 - data_handler.py - INFO - 缺失点数:1.0 - missing_time_splite
+2025-03-25 08:48:02,966 - data_handler.py - INFO - 需要补值的点数:1.0 - missing_time_splite
+2025-03-25 08:48:02,967 - data_handler.py - INFO - 2022-06-27 06:45:00 ~ 2022-06-27 07:15:00 - missing_time_splite
+2025-03-25 08:48:02,968 - data_handler.py - INFO - 缺失点数:1.0 - missing_time_splite
+2025-03-25 08:48:02,968 - data_handler.py - INFO - 需要补值的点数:1.0 - missing_time_splite
+2025-03-25 08:48:02,971 - data_handler.py - INFO - 2022-07-01 06:30:00 ~ 2022-07-01 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,971 - data_handler.py - INFO - 缺失点数:68.0 - missing_time_splite
+2025-03-25 08:48:02,976 - data_handler.py - INFO - 2022-07-08 06:15:00 ~ 2022-07-08 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,977 - data_handler.py - INFO - 缺失点数:69.0 - missing_time_splite
+2025-03-25 08:48:02,978 - data_handler.py - INFO - 2022-07-09 06:15:00 ~ 2022-07-09 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,978 - data_handler.py - INFO - 缺失点数:69.0 - missing_time_splite
+2025-03-25 08:48:02,979 - data_handler.py - INFO - 2022-07-10 06:15:00 ~ 2022-07-10 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,979 - data_handler.py - INFO - 缺失点数:69.0 - missing_time_splite
+2025-03-25 08:48:02,980 - data_handler.py - INFO - 2022-07-11 06:00:00 ~ 2022-07-11 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,980 - data_handler.py - INFO - 缺失点数:70.0 - missing_time_splite
+2025-03-25 08:48:02,981 - data_handler.py - INFO - 2022-07-12 06:00:00 ~ 2022-07-12 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,981 - data_handler.py - INFO - 缺失点数:70.0 - missing_time_splite
+2025-03-25 08:48:02,982 - data_handler.py - INFO - 2022-07-13 06:00:00 ~ 2022-07-13 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,982 - data_handler.py - INFO - 缺失点数:70.0 - missing_time_splite
+2025-03-25 08:48:02,984 - data_handler.py - INFO - 2022-07-14 23:00:00 ~ 2022-07-14 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,984 - data_handler.py - INFO - 缺失点数:2.0 - missing_time_splite
+2025-03-25 08:48:02,984 - data_handler.py - INFO - 需要补值的点数:2.0 - missing_time_splite
+2025-03-25 08:48:02,997 - data_handler.py - INFO - 2022-08-01 20:00:00 ~ 2022-08-01 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,997 - data_handler.py - INFO - 缺失点数:14.0 - missing_time_splite
+2025-03-25 08:48:02,999 - data_handler.py - INFO - 2022-08-02 21:00:00 ~ 2022-08-02 23:45:00 - missing_time_splite
+2025-03-25 08:48:02,999 - data_handler.py - INFO - 缺失点数:10.0 - missing_time_splite
+2025-03-25 08:48:03,000 - data_handler.py - INFO - 2022-08-04 00:00:00 ~ 2022-08-04 23:15:00 - missing_time_splite
+2025-03-25 08:48:03,001 - data_handler.py - INFO - 缺失点数:92.0 - missing_time_splite
+2025-03-25 08:48:03,001 - data_handler.py - INFO - 2022-08-05 00:00:00 ~ 2022-08-05 23:15:00 - missing_time_splite
+2025-03-25 08:48:03,001 - data_handler.py - INFO - 缺失点数:92.0 - missing_time_splite
+2025-03-25 08:48:03,002 - data_handler.py - INFO - 2022-08-06 00:00:00 ~ 2022-08-06 23:15:00 - missing_time_splite
+2025-03-25 08:48:03,002 - data_handler.py - INFO - 缺失点数:92.0 - missing_time_splite
+2025-03-25 08:48:03,003 - data_handler.py - INFO - 2022-08-07 00:00:00 ~ 2022-08-07 23:15:00 - missing_time_splite
+2025-03-25 08:48:03,003 - data_handler.py - INFO - 缺失点数:92.0 - missing_time_splite
+2025-03-25 08:48:03,005 - data_handler.py - INFO - 数据总数:8207, 时序缺失的间隔:3, 其中,较长的时间间隔:14 - missing_time_splite
+2025-03-25 08:48:03,005 - data_handler.py - INFO - 需要补值的总点数:4.0 - missing_time_splite
+2025-03-25 08:48:03,005 - data_handler.py - INFO - 再次测算,需要插值的总点数为:4.0 - fill_train_data
+2025-03-25 08:48:03,014 - data_handler.py - INFO - 2022-05-02 08:00:00 ~ 2022-05-05 23:45:00 有 352 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,017 - data_handler.py - INFO - 2022-05-09 00:00:00 ~ 2022-07-01 06:30:00 有 5115 个点, 填补 2 个点. - data_fill
+2025-03-25 08:48:03,019 - data_handler.py - INFO - 2022-07-01 23:45:00 ~ 2022-07-08 06:15:00 有 603 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,020 - data_handler.py - INFO - 2022-07-08 23:45:00 ~ 2022-07-09 06:15:00 有 27 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,021 - data_handler.py - INFO - 2022-07-09 23:45:00 ~ 2022-07-10 06:15:00 有 27 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,022 - data_handler.py - INFO - 2022-07-10 23:45:00 ~ 2022-07-11 06:00:00 有 26 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,023 - data_handler.py - INFO - 2022-07-11 23:45:00 ~ 2022-07-12 06:00:00 有 26 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,024 - data_handler.py - INFO - 2022-07-12 23:45:00 ~ 2022-07-13 06:00:00 有 26 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,026 - data_handler.py - INFO - 2022-07-13 23:45:00 ~ 2022-08-01 20:00:00 有 1810 个点, 填补 2 个点. - data_fill
+2025-03-25 08:48:03,027 - data_handler.py - INFO - 2022-08-01 23:45:00 ~ 2022-08-02 21:00:00 有 86 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,028 - data_handler.py - INFO - 2022-08-02 23:45:00 ~ 2022-08-04 00:00:00 有 98 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,029 - data_handler.py - INFO - 2022-08-04 23:15:00 ~ 2022-08-05 00:00:00 有 4 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,031 - data_handler.py - INFO - 2022-08-05 23:15:00 ~ 2022-08-06 00:00:00 有 4 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,032 - data_handler.py - INFO - 2022-08-06 23:15:00 ~ 2022-08-07 00:00:00 有 4 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,033 - data_handler.py - INFO - 2022-08-07 23:15:00 ~ 2022-08-07 23:45:00 有 3 个点, 填补 0 个点. - data_fill
+2025-03-25 08:48:03,033 - data_handler.py - INFO - 训练集分成了15段,实际一共补值4点 - data_fill
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-不满足time_step - get_train_data
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-无法进行最小分割 - get_train_data
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-不满足time_step - get_train_data
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-无法进行最小分割 - get_train_data
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-不满足time_step - get_train_data
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-无法进行最小分割 - get_train_data
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-不满足time_step - get_train_data
+2025-03-25 08:48:05,457 - data_handler.py - INFO - 特征处理-训练数据-无法进行最小分割 - get_train_data
+2025-03-25 08:48:05,669 - dbmg.py - INFO - ⚠️ 未找到模型 'fmi' 的有效记录 - get_keras_model_from_mongo
+2025-03-25 08:48:05,670 - tf_lstm.py - INFO - 加强训练加载模型权重失败:('cannot unpack non-iterable NoneType object',) - train_init
+2025-03-25 08:48:13,323 - tf_lstm.py - INFO - -----模型训练经过28轮迭代----- - training
+2025-03-25 08:48:13,323 - tf_lstm.py - INFO - 训练集损失函数为:[0.98709 0.4857  0.38789 0.34428 0.31769 0.2972  0.28397 0.27552 0.27048
+ 0.26568 0.26268 0.2593  0.25744 0.25489 0.25417 0.25239 0.2496  0.25125
+ 0.24856 0.2473  0.24671 0.24601 0.24413 0.24449 0.24437 0.24263 0.24266
+ 0.24314] - training
+2025-03-25 08:48:13,323 - tf_lstm.py - INFO - 验证集损失函数为:[0.61994 0.45012 0.40129 0.37275 0.3428  0.32806 0.32041 0.3169  0.31217
+ 0.30889 0.30421 0.30505 0.30078 0.3012  0.29778 0.29507 0.29904 0.2944
+ 0.30124 0.30423 0.31063 0.30335 0.30427 0.3074  0.30603 0.30948 0.30855
+ 0.30437] - training
+2025-03-25 08:48:13,364 - dbmg.py - INFO - ✅ 模型 fmi 保存成功 | 文档ID: 67e1fd4dce6f69e640c3ad38 - insert_trained_model_into_mongo
+2025-03-25 08:48:13,394 - dbmg.py - INFO - ✅ 缩放器 fmi 保存成功 | 文档ID: 67e1fd4dce6f69e640c3ad3a - insert_scaler_model_into_mongo
+2025-03-25 08:48:41,782 - module_wrapper.py - WARNING - From E:\compete\app\model\losses.py:10: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.
+ - _tfmw_add_deprecation_warning
+2025-03-25 08:48:42,030 - dbmg.py - INFO - ✅ 成功加载 fmi 的缩放器 (版本时间: 2025-03-25 08:48:13) - get_scaler_model_from_mongo
+2025-03-25 08:48:42,121 - dbmg.py - INFO - fmi 模型成功从 MongoDB 加载! - get_keras_model_from_mongo
+2025-03-25 08:48:42,122 - dbmg.py - INFO - 🧹 已清理临时文件: C:\Users\ADMINI~1\AppData\Local\Temp\tmph1bvs151.keras - get_keras_model_from_mongo
+2025-03-25 08:48:42,429 - tf_lstm.py - INFO - 执行预测方法 - predict

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 529 - 529
app/predict/data/DQYC/20220807/2365/OUT/DQYC_OUT_PREDICT_POWER.txt


+ 4 - 1
app/predict/tf_lstm_pre.py

@@ -42,12 +42,13 @@ def model_prediction(pre_data, input_file, cap):
         feature_scaler, target_scaler = mgUtils.get_scaler_model_from_mongo(args)
         ts.opt.cap = round(target_scaler.transform(np.array([[float(cap)]]))[0, 0], 2)
         ts.get_model(args)
-        dh.opt.features = json.loads(ts.model_params).get('Model').get('features', ts.opt.features).split(',')
+        dh.opt.features = json.loads(ts.model_params).get('Model').get('features', ','.join(ts.opt.features)).split(',')
         scaled_pre_x, pre_data = dh.pre_data_handler(pre_data, feature_scaler)
 
         success = 1
         # 更新算法状态:1. 启动成功
         write_number_to_file(os.path.join(output_file, status_file), 1, 1, 'rewrite')
+        logger.info("算法启动成功")
         res = list(chain.from_iterable(target_scaler.inverse_transform([ts.predict(scaled_pre_x).flatten()])))
         pre_data['Power'] = res[:len(pre_data)]
         pre_data['PlantID'] = farm_id
@@ -59,6 +60,7 @@ def model_prediction(pre_data, input_file, cap):
         pre_data.to_csv(os.path.join(output_file, file), sep=' ', index=False)
         # 更新算法状态:正常结束
         write_number_to_file(os.path.join(output_file, status_file), 2, 2)
+        logger.info("算法正常结束")
     except Exception as e:
         # 如果算法状态没启动,不更新
         if success:
@@ -66,6 +68,7 @@ def model_prediction(pre_data, input_file, cap):
         my_exception = traceback.format_exc()
         my_exception.replace("\n", "\t")
         result['msg'] = my_exception
+        logger.info("算法状态异常:{}".format(my_exception))
     end_time = time.time()
 
     result['success'] = success

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác