class documentation
class ArchiveGenerator:
Constructor: ArchiveGenerator(archive_name, save_path, cfg_dict, executables_paths, compression)
Build NN Archive files from configuration and model executables.
The generated archive is a compressed tar file that contains config.json and the provided executable files.
| Method | __init__ |
Create a generator for an NN Archive. |
| Method | make |
Generate the NN Archive file. |
| Instance Variable | archive |
Archive file name, including the .tar and compression suffix. |
| Instance Variable | cfg |
Validated archive configuration. |
| Instance Variable | compression |
Compression algorithm used for the tar archive. |
| Instance Variable | executables |
Paths to executable files included in the archive. |
| Instance Variable | save |
Directory where the archive is written. |
| Method | _make |
Create an in-memory config.json file. |
def __init__(self, archive_name:
str, save_path: PathType, cfg_dict: dict, executables_paths: list[ PathType], compression: Literal[ 'xz', 'gz', 'bz2'] = 'xz'):
¶
Create a generator for an NN Archive.
| Parameters | |
archivestr | Desired archive file name. The .tar and compression suffix are added if missing. |
savePathType | Directory where the archive should be written. |
cfgdict | Archive configuration used to build config.json. |
executableslist[ | Paths to model executable files to include. |
compression:Literal[ | Compression algorithm for the tar archive. |
| Raises | |
ValueError | If compression is not one of "xz", "gz", or "bz2". |