Skip to content

Fix broken RandomState wrapper and add coverage - #8

Merged
ms-kumar merged 1 commit into
mainfrom
fix/random-state
Sep 25, 2026
Merged

ms-kumar merged 1 commit into
mainfrom
fix/random-state

Conversation

@ms-kumar

Copy link
Copy Markdown
Owner

RandomState.setattr stripped 8 chars off every attribute name, so reset/pickle/seed bookkeeping all crashed, and torch-internals hacking (_set_state) could never work. Rewrite as a minimal correct int/Generator/None wrapper (no global torch.manual_seed side effects); 6 new tests. Local: pytest + pre-commit clean.

@ms-kumar ms-kumar self-assigned this Sep 25, 2026
@ms-kumar
ms-kumar merged commit e43faf0 into main Sep 25, 2026
10 checks passed
@ms-kumar
ms-kumar deleted the fix/random-state branch September 25, 2026 03:53
@ms-kumar ms-kumar added the enhancement New feature or request label Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant