Skip to content

Preserve streaming VAMP and TICA estimates across model reads - #349

Open
AryanRG wants to merge 1 commit into
deeptime-ml:mainfrom
AryanRG:fix/preserve-streaming-vamp-covariances
Open

AryanRG wants to merge 1 commit into
deeptime-ml:mainfrom
AryanRG:fix/preserve-streaming-vamp-covariances

Conversation

@AryanRG

@AryanRG AryanRG commented Nov 13, 2026

Copy link
Copy Markdown

Fetching a VAMP or TICA model during partial_fit discards its covariance accumulator. The next batch silently starts a new estimate. For two simple batches, VAMP reports covariance 1.25 instead of 26.25 when a model is fetched between them. Accessing .model or calling transform also triggers this.

Keep the accumulated covariances and update the decomposed model when those covariances change. Repeated model reads keep the same model, previously fetched snapshots stay unchanged, and explicit fits still reset the stream. Changing lagtime also starts a fresh covariance estimate before adding data, so statistics from different lags are not mixed. Regression tests cover VAMP/TICA, weighted batches, all three access paths, and explicit-fit resets.

Validation on macOS/Python 3.12:

  • Numerical shard, base interfaces and doctests: 521 passed, with 12 optional Torch collection-skip events.

  • Independent lifecycle and lag-change checks: 70 passed. The original streaming regressions fail on the base; the lag-change regression prevents mixing old and new lags.

  • Current-base native extensions built locally; no native source changes. Full suite and other platform/Python matrices were not run.

  • Include tests for the change

  • Add yourself to AUTHORS

Prepared with AI assistance.

This branch has not been deployed

No deployments
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