]> Piment Noir Git Repositories - freqai-strategies.git/commit
refactor(weights): collapse compose_sample_weights to single-target API
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 25 May 2026 00:04:41 +0000 (02:04 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 25 May 2026 00:04:41 +0000 (02:04 +0200)
commita0a5fdcf43e0ede0eb1f54f05982785dd3393637
tree2ba7c44f01df6d2459b00ee3d4fb5104805aa54e
parent348fa15e87405dfaf269de968f6bd6e7bfd73f7e
refactor(weights): collapse compose_sample_weights to single-target API

LABEL_COLUMNS is single-target by design, so the dict-shaped per-label
map and row-wise aggregation in compose_sample_weights were dead
plumbing. Flatten the signature to a single label_weights vector and
read LABEL_COLUMNS[0] directly in _compose_per_row_weights. Drop the
duplicate-column guard (unreachable under single-target). Align caller
naming on base_weights to match the callee parameter. Add a defensive
check that LABEL_COLUMNS[0] is in dk.label_list to fail loudly if the
project label constant ever diverges from freqtrade's runtime view.
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py
quickadapter/user_data/strategies/Utils.py