What's fixed
- Deterministic index creation —
compute_kmeans now draws its K-means sample from a locally seeded torch.Generator instead of the global RNG, so create() is reproducible for a given seed and no longer perturbs the caller's global torch RNG state.
KeyError when update() runs directly after create() — create() defers per-device loads, so the first update() took the reload branch, where _reload_index mutated and returned the caller's own dict. The clear() + update() refresh then emptied both aliases of that one object and raised on the device key. _reload_index now works on a copy. Existing update tests ran a search() in between, whose blocking reload repopulated the indices and masked the bug.
See PRs #44 and #49 for details.