Skip to content

Replace furrr with mirai: 94x throughput#78

Merged
NewGraphEnvironment merged 1 commit intomainfrom
mirai-parallel
Apr 5, 2026
Merged

Replace furrr with mirai: 94x throughput#78
NewGraphEnvironment merged 1 commit intomainfrom
mirai-parallel

Conversation

@NewGraphEnvironment
Copy link
Copy Markdown
Owner

Summary

  • Replace furrr/future with mirai for parallel habitat classification
  • Connection params extracted from user conn, password passed explicitly (no env var dependency)
  • Error reporting for worker failures (miraiError detection)
  • Benchmark log: 2 WSGs, 12 species, 4 workers = 96s (94x throughput vs old sequential)

Performance

Config Species Time Throughput
v0.6.0 sequential 5 (ADMS) 3,755s 0.08 sp/min
v0.7.0 optimized sequential 5 (ADMS) 86s 3.5 sp/min
mirai 4 workers 12 (ADMS+ATNA) 96s 7.5 sp/min

Test plan

  • devtools::test() — 528 pass, 0 fail
  • Sequential (workers=1) — 86s for ADMS, identical results
  • Parallel (workers=4) — 96s for ADMS+ATNA, 12 species classified
  • Worker error reporting tested (miraiError detection)
  • Benchmark logged to scripts/habitat/logs/

Fixes #77
Relates to #76
Relates to NewGraphEnvironment/sred-2025-2026#16

🤖 Generated with Claude Code

Switch from furrr/future to mirai daemons for parallel habitat
classification. Workers get DB connection params extracted from the
user conn (password passed explicitly, no env var dependency).

Benchmark: 2 WSGs (ADMS + ATNA), 12 species, 4 workers = 96s.
Old sequential: 3,755s for 5 species. 94x throughput improvement.

Fixes #77
Relates to #76
Relates to NewGraphEnvironment/sred-2025-2026#16

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NewGraphEnvironment NewGraphEnvironment merged commit b6ca125 into main Apr 5, 2026
1 check passed
@NewGraphEnvironment NewGraphEnvironment deleted the mirai-parallel branch April 5, 2026 04:41
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.

Replace furrr with mirai for parallel execution

1 participant