aces.cluster_configs.environment

Utility functions to help inspect the environment a workflow is running on.

Module Contents

Functions

log_environment(→ None)

Logs details about the environment executing the function. Used

Attributes

logger

aces.cluster_configs.environment.logger[source]
aces.cluster_configs.environment.log_environment(local_logger: logging.Logger | None = None) None[source]

Logs details about the environment executing the function. Used primarily to record details to a logger for debugging and recording. Details captured are current working directory, and environment variables.

If an Orion logging handler has been attached via PREFECT_LOGGING_EXTRAS and this function is called before a flow has started, an error would be raised. An alternate logging object may be passed though.

Args:

local_logger (Optional[logging.Logger], optional): A logger that is desired for output. Useful for logging in functions outside of a prefect flow if an Orion handler has been attached. If None, the aces logger is used. Defaults to None.