mantispy.settings#

mantispy.settings = MantispySettings(cache_dir=PosixPath('/home/docs/.cache/mantispy'), stream_bytes=506689280)#

Allows users to customize settings for the mantispy package.

Settings here will generally be for advanced use-cases and should be used with caution.

For setting an option use override() (local) or set the attributes directly (global) e.g., mantispy.settings.my_setting = foo. For assignment by environment variable, use the variable name in all caps with MANTISPY_ as the prefix before import of mantispy.

The following options are available:

settings.cache_dir: pathlib.Path = PosixPath('/home/docs/.cache/mantispy')#

Where mantispy.ds keeps the datasets it downloads.

settings.stream_bytes: int = 506689280#

How many bytes of a matrix that is not in memory a grouped operation reads at once. The default is a sixteenth of the machine’s memory, between 256 MB and 4 GB. Groups are packed into reads of about this size, and a group larger than that is read a block of columns at a time, so a smaller value lowers the peak memory and a larger one reads the file in fewer passes. mantispy.io.read() with lazy=True also sizes its chunks so that one per dask worker fits in this many bytes.