diff --git a/rasa/cli/scaffold.py b/rasa/cli/scaffold.py index 039cb80cde39..d6a2acf06ad4 100644 --- a/rasa/cli/scaffold.py +++ b/rasa/cli/scaffold.py @@ -6,13 +6,13 @@ from rasa import telemetry from rasa.cli import SubParsersAction from rasa.cli.shell import shell -from rasa.cli.utils import create_output_path from rasa.shared.utils.cli import print_success, print_error_and_exit from rasa.shared.constants import ( DOCS_BASE_URL, DEFAULT_CONFIG_PATH, DEFAULT_DOMAIN_PATH, DEFAULT_DATA_PATH, + DEFAULT_MODELS_PATH, ) @@ -65,7 +65,7 @@ def print_train_or_instructions(args: argparse.Namespace) -> None: DEFAULT_DOMAIN_PATH, DEFAULT_CONFIG_PATH, DEFAULT_DATA_PATH, - create_output_path(), + DEFAULT_MODELS_PATH, ) args.model = training_result.model diff --git a/rasa/cli/utils.py b/rasa/cli/utils.py index 5ec15d968242..dd0704f498ba 100644 --- a/rasa/cli/utils.py +++ b/rasa/cli/utils.py @@ -106,39 +106,8 @@ def parse_last_positional_argument_as_model_path() -> None: sys.argv[-2] = "--model" -def create_output_path( - output_path: Text = DEFAULT_MODELS_PATH, - prefix: Text = "", - fixed_name: Optional[Text] = None, -) -> Text: - """Creates an output path which includes the current timestamp. - - Args: - output_path: The path where the model should be stored. - fixed_name: Name of the model. - 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: - if fixed_name: - name = fixed_name - else: - time_format = "%Y%m%d-%H%M%S" - name = time.strftime(time_format) - name = f"{prefix}{name}" - file_name = f"{name}.tar.gz" - return os.path.join(output_path, file_name) - - def button_to_string(button: Dict[Text, Any], idx: int = 0) -> Text: """Create a string representation of a button.""" - title = button.pop("title", "") if "payload" in button: