Skip to content

unit test - don't use global random generator #2521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

chriselion
Copy link
Contributor

(hopefully) make this test more deterministic. It's creating its own random.Random instance but not using it.

@vincentpierre vincentpierre self-requested a review September 9, 2019 23:25
@chriselion
Copy link
Contributor Author

For background, we set the tf and np seeds here

np.random.seed(training_seed)
tf.set_random_seed(training_seed)

but not python's global random seed.

The only other place this appears to be used is

random.randint(0, num_sequences_in_buffer - 1) * sequence_length

@chriselion chriselion merged commit 31529b8 into develop Sep 9, 2019
@vincentpierre vincentpierre deleted the develop-unit-test---don't-use-global-random-generator branch September 9, 2019 23:59
surfnerd pushed a commit that referenced this pull request Sep 12, 2019
* unit test - don't use global random generator

* Update test_simple_rl.py
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants