Skip to content

Instantly share code, notes, and snippets.

@johntmyers
Created June 15, 2020 19:06
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/18ae7eccdc20f52ab8fcedc3d65a9330 to your computer and use it in GitHub Desktop.
Save johntmyers/18ae7eccdc20f52ab8fcedc3d65a9330 to your computer and use it in GitHub Desktop.
gretel-synthetics-0.10.0-part2
# ``batcher`` is our ``DataFrameBatch`` instance
def my_validator(line: str) -> bool:
# ``str`` is a single line of generated text
# return a bool, True for valid, False for invalid
# throwing an Exception also invalidates the line
...
# set a validator function for our first batch
batcher.set_batch_validator(0, my_validator)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment