perf: trim persisted ML fold metadata
This commit is contained in:
@@ -87,3 +87,21 @@ def test_classification_splits_skip_training_windows_with_one_class():
|
||||
|
||||
assert len(viable) == 1
|
||||
assert viable[0][0].tolist() == [0, 1, 3, 4]
|
||||
|
||||
|
||||
def test_artifact_folds_omit_large_internal_index_arrays():
|
||||
folds = [{
|
||||
"fold": 1,
|
||||
"train_idx": [0, 1],
|
||||
"val_idx": [2, 3],
|
||||
"weights": {"fear_greed": 1.0},
|
||||
"date_ranges": {"validation": "2024-01-01 to 2024-01-02"},
|
||||
}]
|
||||
|
||||
saved = optimizer.artifact_fold_results(folds)
|
||||
|
||||
assert saved == [{
|
||||
"fold": 1,
|
||||
"weights": {"fear_greed": 1.0},
|
||||
"date_ranges": {"validation": "2024-01-01 to 2024-01-02"},
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user