Skip to content

Instantly share code, notes, and snippets.

@zredlined
Last active February 19, 2021 06:27
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 zredlined/03258b2008b3a568c0158ab484d3038f to your computer and use it in GitHub Desktop.
Save zredlined/03258b2008b3a568c0158ab484d3038f to your computer and use it in GitHub Desktop.
# Create the Gretel Synthtetics Training / Model Configuration
from pathlib import Path
from gretel_helpers.synthetics import create_df, SyntheticDataBundle
config_template = {
"epochs": 50,
"early_stopping": False,
"vocab_size": 20,
"reset_states": False,
"checkpoint_dir": str(Path.cwd() / "checkpoints-sin"),
"overwrite": True,
}
model = SyntheticDataBundle(
training_df=trends_df,
delimiter=",",
auto_validate=True,
synthetic_config=config_template,
header_prefix=['date'] # Seed the model with the date field
)
model.build()
model.train()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment