Skip to content

Add ability to sample dataset #12

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
merged 5 commits into from
Feb 19, 2019
Merged

Add ability to sample dataset #12

merged 5 commits into from
Feb 19, 2019

Conversation

vishalbollu
Copy link
Contributor

@vishalbollu vishalbollu commented Feb 12, 2019


Checklist:

  • Add license header to each new file
  • Test end to end manually (e.g. rebuild registry/operator and run cx refresh in an example folder)
  • Run automated tests (./build/test.sh)
  • Update documentation
  • Update examples and cx init
  • Alert team if dev environment changed
  • Cherry-pick bugfixes into release branches
  • Delete the branch once it's merged

@vishalbollu vishalbollu requested a review from deliahu February 12, 2019 23:58
if max_rows == full_dataset_size:
return ingest_df
if subset_config["shuffle"]:
ingest_df = ingest_df.sample(fraction=fraction, seed=subset_config["seed"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, research if using fraction=1.0 reduces efficiency. If it does hurt, we should either bump the fraction a little to avoid undersampling, or add the word "roughly" in the docs. If it does work, then the logger.info below doesn't need "at most" :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an extra buffer to sampling but I think we should still have at most to cover randomness

Copy link
Member

@deliahu deliahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vishalbollu vishalbollu merged commit 2754e02 into master Feb 19, 2019
@vishalbollu vishalbollu deleted the small-dataset branch February 19, 2019 22:37
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