📟 CLI#
- text_machina.cli.explore(config_path, task_type, metrics_path=None, run_name=None, save_dir=None, max_generations=10, interactive=True)[source]#
Generates a small set of texts, compares it against human texts, providing metrics and an interface for manual inspection of the generations
- Return type:
- text_machina.cli.generate(config_path, task_type, run_name=None, save_dir=None)[source]#
Generates a dataset from the provided config or directory with configs.
- Return type:
- text_machina.cli_utils.compute_statistics(dataset)[source]#
Computes a set of statistics of a generated dataset.
- Parameters:
dataset (Dataset) – the dataset of which statistics are computed.
- Returns:
the statistics.
- Return type:
Dict[str, pd.DataFrame]
- text_machina.cli_utils.count_errors(dataset)[source]#
Counts the number of generation errors in the dataset. A generation error is identified as a text being GENERATION_ERROR.
- Parameters:
dataset (Dataset) – a dataset.
- Returns:
number of errors in the dataset.
- Return type:
- text_machina.cli_utils.generate_dataset(configs, save_dir, run_name)[source]#
Generates a dataset given a list of configs. Only generates a dataset for a config if it hasn’t been already generated for this run_name.
Computes statistics for the generated dataset.
- text_machina.cli_utils.generate_from_config(config, save_dir, run_name)[source]#
Generates a dataset using TextGeneration parameterized by config and saves it.