Skip to content

Give each class a random_state param to pass around to methods - #31

Merged
sappelhoff merged 2 commits into
masterfrom
rng
Jun 18, 2020
Merged

sappelhoff merged 2 commits into
masterfrom
rng

Conversation

@sappelhoff

Copy link
Copy Markdown
Owner

This should fix our random tests to a certain seed so that they consistently pass according to our expected outputs.

@codecov-commenter

codecov-commenter commented Jun 18, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #31 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
+ Coverage   97.20%   97.21%   +0.01%     
==========================================
  Files           6        6              
  Lines         643      647       +4     
==========================================
+ Hits          625      629       +4     
  Misses         18       18              
Impacted Files Coverage Δ
pyprep/find_noisy_channels.py 95.98% <100.00%> (+0.01%) ⬆️
pyprep/prep_pipeline.py 100.00% <100.00%> (ø)
pyprep/reference.py 96.29% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61efb9c...5ff5554. Read the comment docs.

@sappelhoff

Copy link
Copy Markdown
Owner Author

@yjmantilla this PR should solve the randomness in the tests ...

The idea is that you can pass a random_seed to any of the main classes PrepPipeline, NoisyChannels, or Reference and if that class internally initializes another class, or calls a method, ... the random_seed is passed on, and so the outputs stay reproducible according to the seed

@sappelhoff
sappelhoff merged commit 69994f8 into master Jun 18, 2020
@sappelhoff
sappelhoff deleted the rng branch June 18, 2020 12:45
@sappelhoff sappelhoff mentioned this pull request Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants