Remove legacy LSTM retraining

This commit is contained in:
Codex
2026-06-20 22:07:21 +03:00
parent d9c0317675
commit ccf457481b
14 changed files with 179 additions and 619 deletions
+3 -22
View File
@@ -76,32 +76,13 @@ def test_time_series_forecaster_blocks_negative_edge(make_settings, tmp_path) ->
assert forecast.block_entry is True
def test_time_series_forecaster_includes_lstm_candidate(make_settings, tmp_path) -> None:
settings = make_settings(
tmp_path,
time_series_min_candles=80,
time_series_validation_window=20,
time_series_lstm_enabled=True,
time_series_lstm_lookback=12,
time_series_lstm_units=4,
)
returns = []
for index in range(140):
seasonal = 0.00018 if index % 5 in {0, 1, 2} else -0.00011
returns.append(seasonal + 0.00002 * ((index % 7) - 3))
forecast = TimeSeriesForecaster(settings).forecast(_candles_from_returns(returns), symbol="BTCUSDT")
assert forecast.usable is True
assert any(candidate["model"] == "lstm" for candidate in forecast.candidates)
def test_time_series_forecaster_reads_lstm_artifact(make_settings, tmp_path) -> None:
def test_time_series_forecaster_ignores_legacy_lstm_artifact(make_settings, tmp_path) -> None:
artifact_path = tmp_path / "lstm_forecaster.json"
artifact_path.write_text(
json.dumps(
{
"version": 1,
"type": "lstm_reservoir_ridge_params",
"symbols": {
"BTCUSDT": {"lookback": 10, "units": 3, "ridge": 0.01},
},
@@ -121,7 +102,7 @@ def test_time_series_forecaster_reads_lstm_artifact(make_settings, tmp_path) ->
forecast = TimeSeriesForecaster(settings).forecast(_candles_from_returns(returns), symbol="BTCUSDT")
assert forecast.usable is True
assert any(candidate["model"] == "lstm" for candidate in forecast.candidates)
assert all(candidate["model"] != "lstm" for candidate in forecast.candidates)
def test_time_series_forecaster_reads_torch_gru_artifact(make_settings, tmp_path) -> None: