Skip to content

Current usage of seeding rand in kmeans is not portable #1484

@michaelkirk

Description

@michaelkirk

rand::StdRng is not portable, meaning (for example) that StdRng::from_seed(42).next_u32() will not necessarily give you the same output across machine/os/compiler configurations.

Our impetus for adding a seed configuration was to have repeatable CI. It's certainly more (mostly) repeatable, but might give different behavior across OS versions and on CI arch/os vs developer arch/os.

An alternative would be to use something portable like https://docs.rs/rand_chacha/latest/rand_chacha/

To be clear, I personally think this is low priority given our usage of rand, but I wanted to write it down before I forgot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions