runners
Utility modules for making running workers and pods easier.
Modules in this package must never be imported into the core Bitfount package. Anything defined here is intended for the end user either directly or indirectly e.g. via scripts, tutorials, etc.
Module
Submodules
- bitfount.runners.config_schemas - Dataclasses to hold the configuration details for the runners.
- bitfount.runners.exceptions - Custom exceptions for the runners package.
- bitfount.runners.modeller_runner - Utility functions for running modellers from configs.
- bitfount.runners.pod_runner - Contains courtesy classes and functions for making pod running easier.
- bitfount.runners.upload_task_templates - This script takes a config of task templates and uploads them to bitfount hub.
- bitfount.runners.utils - Utility functions for the runner modules.
Functions
setup_loggers
def setup_loggers( loggers: list[logging.Logger], log_file_dir_name: Optional[str] = None, log_level: Union[int, str] = 20, clear_existing_handlers: bool = True, clear_existing_filters: bool = True,) ‑> list:
Set up supplied loggers with stdout and file handlers.
Creates a logfile in 'logs' directory with the current date and time and outputs all logs at the "DEBUG" level. Also outputs logs to stdout at the "INFO" level. A common scenario is to attach handlers only to the root logger, and to let propagation take care of the rest.
Arguments
loggers
: The logger(s) to set uplog_file_dir_name
: Creates a subdirectory inside BITFOUNT_LOGS_DIR if provided. Defaults to None.log_level
: The log level to apply to the console logsclear_existing_handlers
: If True, clear existing handlers for each loggerclear_existing_filters
: If True, clear existing filters for each logger
Returns A list of updated logger(s).