feat: implement 15-minute timeframe upgrade for model training and data processing
- Introduced a new markdown document detailing the plan to transition the entire pipeline from a 1-minute to a 15-minute timeframe, aiming to improve model AUC from 0.49-0.50 to over 0.53. - Updated key parameters across multiple scripts, including `LOOKAHEAD` adjustments and default data paths to reflect the new 15-minute interval. - Modified data fetching and training scripts to ensure compatibility with the new timeframe, including changes in `fetch_history.py`, `train_model.py`, and `train_and_deploy.sh`. - Enhanced the bot's data stream configuration to operate on a 15-minute interval, ensuring real-time data processing aligns with the new model training strategy. - Updated training logs to capture new model performance metrics under the revised timeframe.
This commit is contained in:
@@ -44,6 +44,11 @@ class MLFilter:
|
||||
self._try_load()
|
||||
|
||||
def _try_load(self):
|
||||
# 로드 여부와 무관하게 두 파일의 현재 mtime을 항상 기록한다.
|
||||
# 이렇게 해야 로드하지 않은 쪽 파일이 나중에 변경됐을 때만 리로드가 트리거된다.
|
||||
self._loaded_onnx_mtime = _mtime(self._onnx_path)
|
||||
self._loaded_lgbm_mtime = _mtime(self._lgbm_path)
|
||||
|
||||
# ONNX 우선 시도
|
||||
if self._onnx_path.exists():
|
||||
try:
|
||||
@@ -53,8 +58,6 @@ class MLFilter:
|
||||
providers=["CPUExecutionProvider"],
|
||||
)
|
||||
self._lgbm_model = None
|
||||
self._loaded_onnx_mtime = _mtime(self._onnx_path)
|
||||
self._loaded_lgbm_mtime = 0.0
|
||||
logger.info(
|
||||
f"ML 필터 로드: ONNX ({self._onnx_path}) "
|
||||
f"| 임계값={self._threshold}"
|
||||
@@ -68,8 +71,6 @@ class MLFilter:
|
||||
if self._lgbm_path.exists():
|
||||
try:
|
||||
self._lgbm_model = joblib.load(self._lgbm_path)
|
||||
self._loaded_lgbm_mtime = _mtime(self._lgbm_path)
|
||||
self._loaded_onnx_mtime = 0.0
|
||||
logger.info(
|
||||
f"ML 필터 로드: LightGBM ({self._lgbm_path}) "
|
||||
f"| 임계값={self._threshold}"
|
||||
|
||||
Reference in New Issue
Block a user