demo package
Submodules
demo.console_utils module
- demo.console_utils.get_int_input(prompt: str, input_range: range | None = None) int [source]
Prompts the user for an integer input and validates it.
- Parameters:
prompt (str) – The prompt message to display to the user.
input_range (range, optional) – The range of valid input values. Defaults to None.
- Returns:
The validated integer input.
- Return type:
int
- Raises:
ValueError – If the input is not a valid integer.
- demo.console_utils.get_multiple_choice(prompt: str, choices: list) str [source]
Prompts the user with a message and a list of choices, and returns the selected choice.
- Parameters:
prompt (str) – The message to display to the user.
choices (list) – The list of choices to display to the user.
- Returns:
The selected choice.
- Return type:
str
- Raises:
ValueError – If the user enters an invalid input.
- demo.console_utils.get_string_input(prompt: str) str [source]
Prompts the user with a given prompt and returns a non-empty string. The input is case-sensitive and will be stripped from spaces.
- Parameters:
prompt (str) – The prompt to display to the user.
- Returns:
Entered non-empty, stripped string
- Return type:
str
- demo.console_utils.get_yes_no_input(prompt: str) bool [source]
Prompts the user with a given prompt and returns True if the user enters ‘yes’ or ‘y’, and False if the user enters ‘no’ or ‘n’. The input is case-insensitive.
- Parameters:
prompt (str) – The prompt to display to the user.
- Returns:
True if the user enters ‘yes’ or ‘y’, False if the user enters ‘no’ or ‘n’.
- Return type:
bool
demo.demos module
- demo.demos.add_step_if_requested(steps, step_class, step_desc, step_warning_message: str = '')[source]
- demo.demos.pipeline_demo()[source]
Demonstrates the execution of a pipeline.
The function prompts the user to select a pipeline configuration or create a custom one. It then sets a limit for the number of data points to be processed, if specified. Finally, it runs the pipeline with the selected configuration and limit.
- Parameters:
None –
- Returns:
None
- demo.demos.predict_single_lead(evp: EstimatedValuePredictor)[source]
- demo.demos.test_evp_model(evp: EstimatedValuePredictor)[source]
demo.pipeline_utils module
- demo.pipeline_utils.get_all_available_pipeline_json_configs(config_path: str = '/home/runner/work/amos2023ws06-sales-lead-qualifier/amos2023ws06-sales-lead-qualifier/src/demo/pipeline_configs/') list [source]
Returns a list of all available pipeline json configs in the given path. :param config_path: Path to the pipeline json configs :return: List of all available pipeline json configs
- demo.pipeline_utils.get_pipeline_additional_steps() list [source]
Returns a copy of the additional pipeline steps.
- Returns:
A copy of the additional pipeline steps.
- Return type:
list
- demo.pipeline_utils.get_pipeline_config_from_json(config_name: str, config_path: str = '/home/runner/work/amos2023ws06-sales-lead-qualifier/amos2023ws06-sales-lead-qualifier/src/demo/pipeline_configs/') list [source]
Retrieves the pipeline configuration from a JSON file.
- Parameters:
config_name (str) – The name of the configuration file.
config_path (str, optional) – The path to the configuration file. Defaults to DEFAULT_PIPELINE_PATH.
- Returns:
A list of pipeline steps.
- Return type:
list