feat: add time based seed to random.h - #457
Merged
Merged
Conversation
AvikantSrivastava
marked this pull request as ready for review
January 14, 2024 21:19
Contributor
Author
|
@awni can you review this PR? |
awni
reviewed
Jan 16, 2024
awni
left a comment
Member
There was a problem hiding this comment.
Looks good to me. I would check that the tests pass to be sure we weren't relying on a the PRNG default anywhere.
Contributor
Author
I have not added unittests for this particular change yet, should I add them? I ran the existing test suite, all the test cases are passing |
awni
approved these changes
Jan 16, 2024
awni
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution, LGTM!
jzdziarski
pushed a commit
to jzdziarski/mlx
that referenced
this pull request
Jul 26, 2026
* random seed from time * fix: chrono * refactor: snake case
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.
Issue: #429
Proposed changes
The seed used in the random module was fixed to 0. This PR uses a time based seed for initialization
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes