Settings: .settings#

ggml_ot.settings[source]#

Package-wide configuration shared through ggml_ot.settings.

Read or assign the public attributes on this shared object to configure the package at runtime. Use update() to change several settings at once. Each property documents its default value and what happens when it is changed.

Examples

# Set individual properties, e.g., the seed for reproducibility
ggml_ot.settings.random_seed = 123

# Set multiple properties at once, e.g., to use 8 CPU threads and force CPU computation
ggml_ot.settings.update(n_threads=8, device="cpu")

# Or set them directly, e.g. plotting options for saving figures
ggml_ot.settings.figdir = "figures"
ggml_ot.settings.figformat = "png"
ggml_ot.settings.figdpi = 300

Reproducibility and computation#

random_seed

Random seed for package operations.

n_threads

Number of CPU computation threads.

device

Device for PyTorch computations.

verbose

Whether to print verbose output where supported.

Plotting#

figdir

Directory for saved figures.

figformat

Default extension for saved figures, such as "pdf", "png", or "svg".

figdpi

Resolution in dots per inch passed to figure saving.

Data and initialization#

restore_adata_params

Whether to restore stored ggml parameters from an AnnData object when initializing AnnData_TripletDataset.

init_strategy

Initialization strategy for the learned map map_A.

Methods#

update

Change several settings using the same setters as direct assignment.

as_dict

Return a dictionary snapshot of selected settings.