Train

Train models for creating synthetic data. This module is the primary entrypoint for creating a model. It depends on having created a engine specifc configuration and optionally a tokenizer to be used.

class gretel_synthetics.train.TrainingParams(tokenizer_trainer: None, tokenizer: None, config: None)

A structure that is created and passed into the engine-specific training entrypoint. All engine-specific training entrypoints should expect to receive this object and process accordingly.

gretel_synthetics.train.train(store: None, tokenizer_trainer: None = None)

Train a Synthetic Model. This is a facade entrypoint that implements the engine specific training operation based on the provided configuration.

Parameters
  • store – A subclass instance of BaseConfig. This config is reponsible for providing the actual training entrypoint for a specific training routine.

  • tokenizer_trainer – An optional subclass instance of a BaseTokenizerTrainer. If provided this tokenizer will be used to pre-process and create an annotated dataset for training. If not provided a default tokenizer will be used.

gretel_synthetics.train.train_rnn(store: None)

Facade to support backwards compatibility for <= 0.14.x versions.