Skip to content

fix: raise on vector index/size errors instead of out-of-bounds access - #19

Open
bact wants to merge 4 commits into
munlicode:mainfrom
bact:fix/vector-bounds-checks
Open

bact wants to merge 4 commits into
munlicode:mainfrom
bact:fix/vector-bounds-checks

Conversation

@bact

@bact bact commented Sep 28, 2026

Copy link
Copy Markdown
Contributor
  • Replace Vector asserts with std::invalid_argument (Python sees ValueError)
  • Catch exceptions in training threads instead of terminating
  • Add regression tests

Currently, the C++ library users will be generally ok.
But since assert in C++ will just abort the process, Python users will have less clue on why it is terminated. This PR allows Python library users to see proper exception.

Signed-off-by: Arthit Suriyawongkul <[email protected]>
Signed-off-by: Arthit Suriyawongkul <[email protected]>
@bact
bact marked this pull request as draft September 28, 2026 10:59
@bact
bact marked this pull request as ready for review October 4, 2026 18:13
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