Repository navigation
fix: a skill with huge dialog files can no longer crash classifier training - #31
Merged
Merged
Conversation
…aining ovos-skill-days-in-history ships 136,639 dialog lines, one per historical event. Every line became a "not for me" training row, so installing it took the classifier from about 36k rows and 21k features to 175k rows and 821k features. The fit then overflowed SciPy's L-BFGS-B work array (2 x 10 x features x classes = 2.7 billion, past the 32-bit index limit), the training child died with SIGBUS, and the classifier never became ready. - dialog_negatives_exclude (default: days-in-history) leaves a skill's dialog lines out. - Each package contributes at most 2,000 spoken lines, sampled evenly and deterministically, as a guard for skills nobody has listed. The largest ordinary skill measured had 1,643, so setups like the measured ones keep every line. - options_from now turns config lists into tuples for tuple settings. Checked on the crashing install: with the default it trains on 39k rows; with the cap alone, 41k rows (2mn = 355M). check_harness: 8/8 identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KjZYoJmprjrVro214krcYK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Installing
ovos-skill-days-in-historystops Switchboard's classifier from ever becoming ready. The training child dies with SIGBUS, and the log shows "classifier training child exited with -10".The skill ships 136,639 dialog lines, one per historical event. Switchboard trains its "not for me" class on every installed skill's spoken lines, which took the training set from about 36k rows and 21k features to 175k rows and 821k features. Logistic regression keeps a weight per feature per class, and SciPy's L-BFGS-B keeps 10 update pairs of that vector, indexed with 32-bit integers: 2 × 10 × 821k × 166 = 2.7 billion, past 2,147,483,647. Both crash reports fault at the identical address.
The crash reproduces outside OVOS, with SciPy 1.17.1 and 1.18.1. It isn't caused by launchd or by forking: the child is spawned and had 2 threads when it crashed.
The fix
dialog_negatives_exclude(classifier setting), defaulting to["ovos-skill-days-in-history.openvoiceos"]. Those lines are data, not phrasing, and the echo step already handles the assistant hearing itself.options_fromnow turns config lists into tuples for tuple-typed settings.Checks
check_harness: 8/8 identical. 142 tests pass (4 new); ruff and pylint are clean.Still open: the fit isn't bounded against inputs in general. Bounding the vocabulary (min_df or max_features) would be, but it changes the trained model, so it needs its own harness run.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KjZYoJmprjrVro214krcYK