I hereby claim:
- I am johntmyers on github.
- I am johntmyers (https://keybase.io/johntmyers) on keybase.
- I have a public key ASCqahqpY4OgOzF1bwaJlaMIsZRl9NTqNWVvmiPiHArQXwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import re | |
def _sub_special_chars_any(in_string: str): | |
return re.sub("[^a-z\d\s]", ".?", in_string) | |
def _mark_substrings_optional(in_string: str, n=3): | |
parts = in_string.split() | |
if len(parts) == 1: |
# pip install gretel-synthetics | |
from gretel_synthetics.batch import DataFrameBatch | |
# my_source_df = ... | |
# Same configurations parameters as using LocalConfig | |
# https://gretel-synthetics.readthedocs.io/en/stable/api/config.html | |
config_template = { | |
"max_lines": 0, |
# ``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) |
# ``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 | |
# |
{ | |
"data": { | |
"records": [ | |
{ | |
"data": { | |
"Unnamed: 0": 2135731, | |
"Unnamed: 0.1": 2135731, | |
"id": null, | |
"member_id": null, | |
"loan_amnt": 12000, |
# le super secret | |
GRETEL_API_KEY=MYLOYALROYALSUBJECT |
# With the latest Premium SDK, you can write your report to a HTML file for archiving and distribution | |
# ... assuming you have a ``bundle`` object from previous synthetic workloads | |
bundle.generate_report(report_path="./my_report.html") |
In order to clarify the intellectual property license granted with Contributions (as defined below) from any person or entity, Gretel Labs, Inc. (“Gretel.ai”) must have a Contributor License Agreement (“CLA”) on file that has been signed by each Contributor (as defined below), indicating agreement to the license terms below. This CLA is for Your protection as a Contributor as well as the protection of Gretel.ai and its users; it does not change Your rights to use Your own Contributions for any other purpose.
This CLA allows either an individual or an entity (a "Corporation") to submit Contributions to Gretel.ai, to authorize Contributions submitted by its employees or agents to Gretel.ai (in the case of a Corporation), and to grant copyright and patent licenses thereto.
Please read this document carefully and provide the Contributor information requested below before signing and keep a copy for Your records. If You have questions about this CLA, please contact Gretel.ai at [email protected].
By sig