Skip to content

Fix run_extraction TypeError in augment/run CLI commands - #92

Merged
pham-tuan-binh merged 1 commit into
mainfrom
fix/run-extraction-sess-options
Sep 30, 2026
Merged

pham-tuan-binh merged 1 commit into
mainfrom
fix/run-extraction-sess-options

Conversation

@pham-tuan-binh

Copy link
Copy Markdown
Collaborator

Problem

livekit-wakeword augment and livekit-wakeword run crash after augmentation in v0.2.2:

TypeError: run_extraction() missing 1 required positional argument: 'sess_options'

#73 added sess_options to run_extraction as a required argument, but the two CLI callers (cli.py:292, cli.py:398) still call run_extraction(config). CI didn't catch it because no test goes through run_extraction and CI doesn't run mypy.

Fix

  • Default sess_options to None in run_extraction, matching WakeWordModel.__init__. The mel/embedding wrappers already handle None via session_options().
  • Add a regression test that calls run_extraction(config) without sess_options. It fails with the TypeError before this change and passes after.

Testing

  • uv run pytest: 74 passed, 2 skipped
  • Verified on an RTX 5090 box: resumed a hey_reachy pipeline that had crashed at step 3, and feature extraction now runs.

#73 made sess_options a required positional argument of run_extraction,
but the augment and run CLI commands still call run_extraction(config),
so both crash with a TypeError after augmentation. Default sess_options
to None, matching WakeWordModel, and add a regression test.
@pham-tuan-binh
pham-tuan-binh merged commit fb92cb3 into main Sep 30, 2026
8 checks passed
@pham-tuan-binh
pham-tuan-binh deleted the fix/run-extraction-sess-options branch September 30, 2026 21:40
@jvzelst-tech

Copy link
Copy Markdown

Thanks for this fix. Flagging that it isn't in a published release yet: PyPI's latest is still 0.3.0, and its attestation shows it was built from 69324ba — the commit immediately before fb92cb3 merged here. So pip install livekit-wakeword still hits this.

It's an expensive one to hit, because run fails at "Step 3/6: Extract features" after generation completes. On an M2 that was ~12 hours of synthesis (the adversarial negatives alone took 7.5h) before the TypeError surfaced.

Would a patch release including fb92cb3 be possible? In the meantime, anyone stuck can resume without re-generating by calling the remaining stages directly:

from livekit.wakeword.data.features import run_extraction
from livekit.wakeword.session import session_options
run_extraction(config, session_options())

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.

2 participants