mufasa.utils.memory#

This module provides tools to monitor memory usage and estimate the memory allocations needed

Functions

calculate_dask_memory_limit

Mimic Dask's default memory limit setting.

calculate_target_memory

Calculate target memory per core for chunked computations.

get_size_mb

get_system_free_memory

monitor_peak_memory

Decorator to monitor and record the peak memory usage of a function.

peak_memory

Decorator to monitor and display the peak memory usage of a function, including intermediate peaks, and handle multi-threaded tasks.

tmp_save_gauge

Return whether or not it's worth DaskSpectralCube results temporary Based on how much free memory is currenlty left