rasa/model.py
def create_package_rasa(training_directory: Text, output_filename: Text,
                        fingerprint: Optional[Fingerprint] = None) -> Text:
    """Creates a zipped Rasa model from trained model files.

    Args:
        training_directory: Path to the directory which contains the trained
                            model files.
        output_filename: Name of the zipped model file to be created.
        fingerprint: A unique fingerprint to identify the model version.

    Returns:
        Path to zipped model.

    """
    import tarfile

    if fingerprint:
        persist_fingerprint(training_directory, fingerprint)

    output_directory = os.path.dirname(output_filename)
    if not os.path.exists(output_directory):
        os.makedirs(output_directory)

    with tarfile.open(output_filename, "w:gz") as tar:
        for elem in os.scandir(training_directory):
            tar.add(elem.path, arcname=elem.name)

    shutil.rmtree(training_directory)
    return output_filename
Creates a zipped Rasa model from trained model files.

    Args:
        training_directory: Path to the directory which contains the trained
                            model files.
        output_filename: Name of the zipped model file to be created.
        fingerprint: A unique fingerprint to identify the model version.

    Returns:
        Path to zipped model.

    
Creates a zipped Rasa model from trained model files.
Creates a zipped Rasa model from trained model files .
def create_package_rasa(training_directory: Text, output_filename: Text,
                        fingerprint: Optional[Fingerprint] = None) -> Text:
    import tarfile
    if fingerprint:
        persist_fingerprint(training_directory, fingerprint)
    output_directory = os.path.dirname(output_filename)
    if not os.path.exists(output_directory):
        os.makedirs(output_directory)
    with tarfile.open(output_filename, "w:gz") as tar:
        for elem in os.scandir(training_directory):
            tar.add(elem.path, arcname=elem.name)
    shutil.rmtree(training_directory)
    return output_filename
def create_package_rasa ( training_directory : Text , output_filename : Text , fingerprint : Optional [ Fingerprint ] = None ) -> Text : import tarfile if fingerprint : persist_fingerprint ( training_directory , fingerprint ) output_directory = os . path . dirname ( output_filename ) if not os . path . exists ( output_directory ) : os . makedirs ( output_directory ) with tarfile . open ( output_filename , "w:gz" ) as tar : for elem in os . scandir ( training_directory ) : tar . add ( elem . path , arcname = elem . name ) shutil . rmtree ( training_directory ) return output_filename
Creates a zipped Rasa model from trained model files.
Creates a zipped Rasa model from trained model files .
"""Creates a zipped Rasa model from trained model files.

    Args:
        training_directory: Path to the directory which contains the trained
                            model files.
        output_filename: Name of the zipped model file to be created.
        fingerprint: A unique fingerprint to identify the model version.

    Returns:
        Path to zipped model.

    """
Path to zipped model.
Path to zipped model .
training_directory
Text
Path to the directory which contains the trained
model files.
Path to the directory which contains the trained model files .
output_filename
Text
Name of the zipped model file to be created.
Name of the zipped model file to be created .
fingerprint
Optional[Fingerprint]
A unique fingerprint to identify the model version.
A unique fingerprint to identify the model version .