culebra.tools.abc.scripts.BatchGenerator class¶
- class BatchGenerator(args: list[str] | None = None)¶
Bases:
GeneratorScriptConstruct the generator.
Define the command-line arguments.
Class attributes¶
- BatchGenerator.default_batch_obj = 'batch.dill.gz'¶
Default output file for the serialized batch.
- BatchGenerator.default_dm_obj_threshold = 0.0¶
Default objective threshold for the decision manager.
- BatchGenerator.default_experiments_per_batch = 1¶
Default number of experiments per batch.
- BatchGenerator.default_test_func_obj = 'test_func.dill.gz'¶
Default input file for the serialized test fitness function.
- BatchGenerator.default_trainer_obj = 'trainer.dill.gz'¶
Default input file for the serialized trainer.
Static methods¶
- static BatchGenerator.load(filename: str) Base¶
Load a serialized object from a file.
- Parameters:
filename (str) – The file name.
- Returns:
The loaded object
- Raises:
TypeError – If filename is not a valid file name
ValueError – If the filename extension is not
SERIALIZED_FILE_EXTENSION
Methods¶
- BatchGenerator.dump(filename: str) None¶
Serialize this object and save it to a file.
- Parameters:
filename (str) – The file name.
- Raises:
TypeError – If filename is not a valid file name
ValueError – If the filename extension is not
SERIALIZED_FILE_EXTENSION
- BatchGenerator.parse_args() None¶
Parse and validate command-line arguments.
- Raises:
SystemExit – If the command-line arguments are invalid or
--helpis requested.

