rasa/cli/utils.py
def create_output_path(output_path: Text = DEFAULT_MODELS_PATH,
                       prefix: Text = "") -> Text:
    """Creates an output path which includes the current timestamp.

    Args:
        output_path: The path where the model should be stored.
        prefix: A prefix which should be included in the output path.

    Returns:
        The generated output path, e.g. "20191201-103002.tar.gz".
    """
    import time

    if output_path.endswith("tar.gz"):
        return output_path
    else:
        time_format = "%Y%m%d-%H%M%S"
        file_name = "{}{}.tar.gz".format(prefix, time.strftime(time_format))
        return os.path.join(output_path, file_name)
Creates an output path which includes the current timestamp.

    Args:
        output_path: The path where the model should be stored.
        prefix: A prefix which should be included in the output path.

    Returns:
        The generated output path, e.g. "20191201-103002.tar.gz".
    
Creates an output path which includes the current timestamp.
Creates an output path which includes the current timestamp .
def create_output_path(output_path: Text = DEFAULT_MODELS_PATH,
                       prefix: Text = "") -> Text:
    import time
    if output_path.endswith("tar.gz"):
        return output_path
    else:
        time_format = "%Y%m%d-%H%M%S"
        file_name = "{}{}.tar.gz".format(prefix, time.strftime(time_format))
        return os.path.join(output_path, file_name)
def create_output_path ( output_path : Text = DEFAULT_MODELS_PATH , prefix : Text = "" ) -> Text : import time if output_path . endswith ( "tar.gz" ) : return output_path else : time_format = "%Y%m%d-%H%M%S" file_name = "{}{}.tar.gz" . format ( prefix , time . strftime ( time_format ) ) return os . path . join ( output_path , file_name )
Creates an output path which includes the current timestamp.
Creates an output path which includes the current timestamp .
"""Creates an output path which includes the current timestamp.

    Args:
        output_path: The path where the model should be stored.
        prefix: A prefix which should be included in the output path.

    Returns:
        The generated output path, e.g. "20191201-103002.tar.gz".
    """
The generated output path, e.g.
The generated output path e . g .
output_path
Text
The path where the model should be stored.
The path where the model should be stored .
prefix
Text
A prefix which should be included in the output path.
A prefix which should be included in the output path .