fix(analytics): offload correlation math off the event loop + bump timeouts #74
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gertjan/bodega!74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/correlation-offload-timeouts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #73. First night on the staggered schedule removed the OOM
crashes (zero interruptions), but surfaced two issues:
the box the run no longer OOM-crashes, but its working set spills to
swap and thrashes — the same computation took 4288s in RAM on Jun 25.
numpy/scipy blocked the scheduler event loop from 01:00 to ~03:28, so
momentum's 03:00 trigger misfired and was dropped.
Changes:
neighbour extraction, clustering, lead-lag) into a synchronous
_compute_artifacts() helper and dispatch it via asyncio.to_thread, so
the heavy BLAS/scipy passes no longer block the event loop. Behaviour
is unchanged — same computations, same results, same process memory
(thread, not process pool — no memory doubling). Sibling jobs and the
hourly watchdog can now fire while correlation runs.
swap-bound runtime until the memory footprint is reduced.
Note: correlation's peak memory now exceeds physical RAM as the universe
has grown; the timeout bump is a stopgap. Reducing its footprint (chunk
the lead-lag pass / cap the universe) remains a follow-up.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com