io_manager
I/O and file management utilities for the argus package.
setup_output_directory
Set up output directory for the inference run.
Parameters:
-
config
–Configuration object
-
use_gw
(bool
) –Whether to include gravitational wave model
-
timestamp
(str
, default:None
) –Optional timestamp to use for output directory
-
config_path
(str
, default:None
) –Optional path to the configuration file to determine workflow directory
Returns
str: output_dir path
copy_config_file
save_numpyro_results
setup_single_logger
Set up a single, properly configured logger for the entire application.
This function creates a centralized logger that eliminates duplicate messages and provides consistent logging throughout the application. It supports both console and file logging.
Parameters:
-
config
–Configuration object
-
output_dir
(str
, default:None
) –Directory for log files. Required if enable_file_logging=True
-
enable_file_logging
(bool
, default:True
) –Whether to enable file logging. Default True.
Returns
logging.Logger: Configured logger instance for the entire application
Raises
ValueError: If enable_file_logging=True but output_dir is None
get_argus_logger
Get the centralized argus logger.
This function provides consistent access to the main application logger throughout the codebase. The logger should be initialized first using setup_single_logger().
Returns
logging.Logger: The centralized argus logger
Raises
RuntimeError: If the logger hasn't been initialized with setup_single_logger()