threads_info#

scikitplot.annoy.threads_info()[source]#

Describe what decides the number of threads in this process.

Returns:
dict
compiled

Whether the compiled module has the multithreaded build.

mode

The mode in effect (threads_mode).

modes

Every mode, the default first.

env

The name of the environment variable that selects the mode.

cpu_count

The number of CPUs multi uses for n_jobs=-1.

Raises:
ValueError

If the environment variable holds something that is not a mode.

Return type:

dict[str, Any]

Examples

>>> info = threads_info()
>>> info["env"], info["modes"]
('SKPLT_ANNOY_THREADS', ('auto', 'single', 'multi'))