scib_metrics._settings.ScibConfig#

class scib_metrics._settings.ScibConfig(verbosity=20, progress_bar_style='tqdm', jax_preallocate_gpu_memory=False)[source]#

Config manager for scib-metrics.

Examples

To set the progress bar style, choose one of “rich”, “tqdm”

>>> scib_metrics.settings.progress_bar_style = "rich"

To set the verbosity

>>> import logging
>>> scib_metrics.settings.verbosity = logging.INFO

Attributes table#

jax_preallocate_gpu_memory

Jax GPU memory allocation settings.

progress_bar_style

Library to use for progress bar.

verbosity

Verbosity level (default logging.INFO).

Methods table#

jax_fix_no_kernel_image()

Fix for JAX error "No kernel image is available for execution on the device".

reset_logging_handler()

Reset "scib_metrics" log handler to a basic RichHandler().

Attributes#

ScibConfig.jax_preallocate_gpu_memory[source]#

Jax GPU memory allocation settings.

If False, Jax will ony preallocate GPU memory it needs. If float in (0, 1), Jax will preallocate GPU memory to that fraction of the GPU memory.

Returns:

jax_preallocate_gpu_memory: bool or float

ScibConfig.progress_bar_style[source]#

Library to use for progress bar.

ScibConfig.verbosity[source]#

Verbosity level (default logging.INFO).

Returns:

verbosity: int

Methods#

ScibConfig.jax_fix_no_kernel_image()[source]#

Fix for JAX error “No kernel image is available for execution on the device”.

Return type:

None

ScibConfig.reset_logging_handler()[source]#

Reset “scib_metrics” log handler to a basic RichHandler().

This is useful if piping outputs to a file.

Return type:

None

Returns:

None