-
Notifications
You must be signed in to change notification settings - Fork 320
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
Fix seed to generate deterministic samples #713
Conversation
setup.py
Outdated
@@ -18,8 +18,8 @@ | |||
"numpy>=1.20.0,<2;python_version>='3.7'", | |||
'pandas>=1.1.3,<2', | |||
'tqdm>=4.15,<5', | |||
'copulas>=0.6.0,<0.7', | |||
'ctgan>=0.5.0,<0.6', | |||
'copulas>=0.6.1.dev0,<0.7', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update these version numbers once copulas
and ctgan
are released.
Codecov Report
@@ Coverage Diff @@
## v0.14.0.dev #713 +/- ##
===============================================
+ Coverage 65.86% 66.00% +0.14%
===============================================
Files 36 36
Lines 2651 2665 +14
===============================================
+ Hits 1746 1759 +13
- Misses 905 906 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just some small details.
@@ -390,6 +391,19 @@ def _conditionally_sample_rows(self, dataframe, max_retries, max_rows_multiplier | |||
|
|||
return sampled_rows | |||
|
|||
def _randomize_samples(self, randomize_samples): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this used anywhere apart from the unit tests.
On the other hand, what happens if randomize_samples
is True
?
Should we set the seed to None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@csala Yes, if randomize_samples
is true, we should set the seed to None
. I updated the code to call the _randomize_samples
method, and I also added an integration test to test that setting the seed to None works as expected.
be50623
to
c3ab425
Compare
357c999
to
e743810
Compare
e743810
to
e809699
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
e809699
to
c9822f0
Compare
* Fix seed when randomize samples is false * update tests * update dep versions
* Fix seed when randomize samples is false * update tests * update dep versions
Resolves #690