Skip to content

Release v0.3.0: memory-bounded tokenization + DOD-O demo - #4

Merged
joncarter1 merged 2 commits into
mainfrom
release/v0.3.0
Jul 3, 2026
Merged

Release v0.3.0: memory-bounded tokenization + DOD-O demo#4
joncarter1 merged 2 commits into
mainfrom
release/v0.3.0

Conversation

@joncarter1

Copy link
Copy Markdown
Owner

Bumps to 0.3.0 and ships the demo notebook. (0.2.0 was never published to PyPI — only the git tag exists — so we skip it; 0.2.0's channel-mapping changes are already on main and ship inside 0.3.0.)

Changes

  • Memory-bounded tokenization. pipeline.tokenize() tokenizes long recordings in fixed-size windows with both-side warmup context, so peak memory is bounded by the chunk size rather than the recording length (a full night was ~50 GB in one pass, ~7 GB chunked). Output is bit-identical to a single pass — covered by test_tokenize_chunked_matches_single_pass. embed_edf gains tokenize_chunk_seconds.
  • demo.ipynb — end-to-end sleep staging on the Dreem Open Dataset (DOD-O): stream records from Zenodo, generate Hypnos embeddings, train a subject-wise cross-validated linear probe. Linked from the README Usage section.
  • .gitignore: ignore the demo's data/ (downloads + cached embeddings).

Test

pytest tests/test_pipeline.py → 6 passed (includes the new bit-exactness test).

Release steps after merge

  1. Merge to main.
  2. Tag v0.3.0 on main and push (publish guard checks tag == pyproject version = 0.3.0).
  3. Create a GitHub Release for v0.3.0 → triggers publish.yml → PyPI.
  4. Optional: delete the orphan v0.2.0 tag.

🤖 Generated with Claude Code

joncarter1 and others added 2 commits July 3, 2026 09:23
- pipeline.tokenize() now tokenizes long recordings in fixed-size windows
  with both-side warmup context, keeping peak memory bounded by the chunk
  size instead of the recording length. Output is bit-identical to a single
  pass (verified by test_tokenize_chunked_matches_single_pass). embed_edf
  gains tokenize_chunk_seconds.
- Add demo.ipynb: end-to-end sleep-staging example on the Dreem Open Dataset
  (DOD-O) — stream records, generate Hypnos embeddings, train a linear probe
  with subject-wise cross-validation.
- README: link the demo from Usage. .gitignore: ignore demo data/ cache.
- Bump version to 0.3.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`uvx ruff check/format .` lints .ipynb files; the demo notebook uses
in-cell imports and `a; b` one-liners that don't fit the library's rules.
Scope ruff to the package and tests via extend-exclude.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joncarter1
joncarter1 merged commit 9b4f3ba into main Jul 3, 2026
4 checks passed
@joncarter1
joncarter1 deleted the release/v0.3.0 branch July 3, 2026 08:39
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