Skip to content

lrr cluster by field#14

Open
kylmcgr wants to merge 1 commit into
devfrom
llr-bank-aware
Open

lrr cluster by field#14
kylmcgr wants to merge 1 commit into
devfrom
llr-bank-aware

Conversation

@kylmcgr

@kylmcgr kylmcgr commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

LRR can now derive its per-bank regression blocks from a structured channel-axis
field instead of relying on positional block_size.

  • Adds cluster_by_field to SelfSupervisedRegressionSettings (inherited by
    LRR). When set (e.g. "bank") and no explicit channel_clusters are given,
    clusters are derived from that field via
    ezmsg.sigproc.util.channels.channel_clusters_from_field, cached at
    _reset_state (so the message-less _get_channel_clusters — also called
    externally — can return them).
  • Precedence: explicit channel_clusters > cluster_by_field > block_size

    single cluster. Default None preserves current behavior.

  • _hash_message folds the field's bytes into the hash so derived clusters
    re-derive when the field changes (mirrors the sigproc fix).

Tests

TestClusterByField in test_ssr.py: bank-derived weights byte-identical to
explicit per-bank channel_clusters, explicit-clusters precedence, fallback to
block_size, and re-derive on bank change. 21 pass.

⚠️ Before merge

  • Depends on the sigproc helper — land the ezmsg-sigproc car-bank-aware PR
    first.
  • pyproject.toml currently pins ezmsg-sigproc to the car-bank-aware branch
    in [tool.uv.sources] for local testing.

@kylmcgr kylmcgr requested a review from cboulay June 30, 2026 19:22
@kylmcgr kylmcgr self-assigned this Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant