Skip to content

Fix train.py CLI defaults, optional Piper, and validation batch size - #351

Open
zain1806481 wants to merge 1 commit into
dscripka:mainfrom
zain1806481:fix/train-cli-vram
Open

zain1806481 wants to merge 1 commit into
dscripka:mainfrom
zain1806481:fix/train-cli-vram

Conversation

@zain1806481

Copy link
Copy Markdown

Summary

  • Replace default="False" on store_true CLI flags with default=False (the string is truthy).
  • Only import Piper sample generation when piper_sample_generator_path is set.
  • Cap false-positive validation DataLoader batch size at 256 to avoid loading the entire validation set onto small GPUs at once.

Context

Hit while training on a 2 GB Pascal GPU. Validation previously used batch_size=len(X_val_fp_labels), which could request multiple GB of feature windows in one step.

Test plan

  • python -m openwakeword.train --help shows flags defaulting off
  • Training config without piper_sample_generator_path gets past import when not generating clips
  • Validation step on a low-VRAM GPU completes without allocating the full validation tensor set in one batch

Made with Cursor

store_true flags used the truthy string "False" as default. Make Piper
import optional when no sample generator path is configured. Cap
validation DataLoader batch size so large feature sets do not OOM on
small GPUs.
@zain1806481

Copy link
Copy Markdown
Author

Week submission index: https://github.com/zain1806481/upstream-week-2026-09-14

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