fix: resolve ML filter dtype error and missing BTC/ETH correlation features
- Fix LightGBM predict_proba ValueError by filtering FEATURE_COLS and casting to float64 - Extract BTC/ETH correlation data from embedded parquet columns instead of missing separate files - Disable ONNX priority in ML filter tests to use mocked LightGBM correctly - Add NO_ML_FILTER=true to .env.example (ML adds no value with current signal thresholds) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ def test_no_model_should_enter_returns_true(tmp_path):
|
||||
def test_should_enter_above_threshold():
|
||||
"""확률 >= 0.60 이면 True"""
|
||||
f = MLFilter(threshold=0.60)
|
||||
f._onnx_session = None # ONNX 비활성화, LightGBM만 테스트
|
||||
mock_model = MagicMock()
|
||||
mock_model.predict_proba.return_value = np.array([[0.35, 0.65]])
|
||||
f._lgbm_model = mock_model
|
||||
@@ -42,6 +43,7 @@ def test_should_enter_above_threshold():
|
||||
def test_should_enter_below_threshold():
|
||||
"""확률 < 0.60 이면 False"""
|
||||
f = MLFilter(threshold=0.60)
|
||||
f._onnx_session = None # ONNX 비활성화, LightGBM만 테스트
|
||||
mock_model = MagicMock()
|
||||
mock_model.predict_proba.return_value = np.array([[0.55, 0.45]])
|
||||
f._lgbm_model = mock_model
|
||||
|
||||
Reference in New Issue
Block a user