Created
June 15, 2020 19:06
-
-
Save johntmyers/18ae7eccdc20f52ab8fcedc3d65a9330 to your computer and use it in GitHub Desktop.
gretel-synthetics-0.10.0-part2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ``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