Skip to content

Instantly share code, notes, and snippets.

@johntmyers
Created June 15, 2020 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johntmyers/c1734e7109c058b23f5463469c0ae65c to your computer and use it in GitHub Desktop.
Save johntmyers/c1734e7109c058b23f5463469c0ae65c to your computer and use it in GitHub Desktop.
gretel-synthetics-0.10.0-part3
# ``batcher`` is our ``DataFrameBatch`` instance
# this creates a DataFrame and a "train.csv" file for each of our batches
batcher.create_training_data()
# loops over all batches, and generates the models
batcher.train_all_batches()
# loops over all models, and generates synthetic lines for each one
#
# returns a dictionary that shows if each batch was able to generate
# the full number of requested lines
#
# Example return:
# {
# 0: True,
# 1: True,
# 2: True,
# ...
# }
status = batcher.generate_all_batch_lines()
# If all batches could generate the requested number of lines...Shizzam!
synthetic_df = batcher.batches_to_df()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment