Repository navigation
[2/4] Stateful shared memory and reactive online processing - #146
Conversation
Replay only the feature delta 265d0ae..378d6c1. Preserve latest datasets, metrics formulas, discrete models, device additions, channel-last windows and spacebar collection. Keep NumPy compatibility fixes without the unrelated metric-fixture rename. Defer reactive and pipeline docs to their implementations; omit generated environment locks. Co-authored-by: Christian Morrell <cmorrell@unb.ca>
Replayed from 4f65170 with the five existing core test modules brought forward from 16cdc6b. Preserve latest Myo address and Emager version support, multi-rate/discrete offline window parsing, and integrate the upstream MindRove and Muovi Plus writers with atomic state publication. Includes the reactive documentation alongside its implementation.
68a1d52 to
c5c1688
Compare
|
@copilot can you rebase on latest? |
# Conflicts: # docs/source/emg_toolbox.rst # libemg/_streamers/_oymotion_streamer.py # libemg/_streamers/_sifi_bridge_streamer.py # libemg/adaptation/managers.py # libemg/emg_predictor.py # libemg/environments/__init__.py # libemg/output_writer.py # libemg/shared_memory_manager.py # libemg/streamers.py # requirements.txt # setup.py Co-authored-by: eeddy <31893850+eeddy@users.noreply.github.com>
Co-authored-by: eeddy <31893850+eeddy@users.noreply.github.com>
Done — I merged |
|
@ECEEvanCampbell A couple high level questions before I do a full review: (1) Does this overwrite all of the non-reactive functionality from before or is it just additive? Generally I like and get the concept but I wonder if it adds un-needed complexity if its forced? LMK what you think, |
We do sort of require this kind of rewrite when we move to supporting many of our capabilities in the gui. Instead of needing to spawn a process for each of the components that might trigger off live data coming in, we are able to hook into the inputs and update them when their inputs have changed in a meaningful order in one process (rather than having 10 processes polling). |
|
@ECEEvanCampbell Okay this sounds good to me! Thanks for the in depth answer. |
|
@copilot I shouldn't have a setup.py anymore since I deleted it in favour of toml in latest. Also requirements.txt updates seem odd? |
Co-authored-by: eeddy <31893850+eeddy@users.noreply.github.com>
Fixed in |
Polling/copying entire buffers just to detect arrivals is replaced with published shared-memory state and notifications. This part adds atomic commit/apply operations, state snapshots, window/delta reads, notifier pools, reactive criteria/hooks/executors, event logging, and the corresponding streamer/predictor/adaptation integration.
The existing five core regression modules are included here, before the GUI work. Latest's Emager v3 path is retained; its writer and the upstream-only MindRove/Muovi Plus writers publish state through the same atomic contract. Their existing sample ordering and counts are covered by integration tests.
Validation: 153 passed across the stateful/reactive/adaptation/event-log suites, feature and metric checks, and retained-upstream integration tests.
Part 2/4, split from #142 and rebuilt on current
latest(06ba120). Review this part alone: single feature commit · incremental comparison.Upstream overlap removed:
libemg/datasets.py,libemg/_datasets/,libemg/offline_metrics.py, andlibemg/_discrete_models/are unchanged fromlatestin every part. Existing formula tests, CI, README, and upstream-only assets are also preserved. The rewritten history contains one feature commit per part; it does not replay the older copied/squashed upstream history.Implementation provenance: replayed feature delta
378d6c1..4f65170from the original branch, with conflict resolutions for newer upstream behavior. The originalcompose_emgpredictorbranch remains available; local pre-rebase backup refs are retained.All four PRs still target
latest. Review and merge in order: #145 → #146 → #147 → #148. Until preceding parts merge, GitHub's PR-wide diff is cumulative; the commit/comparison links above isolate this part. Use merge commits to preserve the chain, or rebase the remaining parts after a squash merge.Test environment: Python 3.13.17 / NumPy 2.4.6, with latest's device/discrete dependencies installed in an isolated test directory. Draft status is retained for review and hardware validation.
The combined Sphinx HTML documentation build succeeds; documentation warnings remain.