glimpse.pools

DEFAULT_POOL_TYPE
DEFAULT_CLUSTER_TYPE
class SinglecorePool

A fall-back worker pool that uses a single core of a single machine.

map(func, iterable, progress=None)

Apply a function to a list using a single local core.

class MulticorePool(processes=None)

A worker pool that uses multiple cores on a single machine.

map(func, iterable, progress=None)

Apply a function to a list using multiple local cores.

MakePool(name=None, **kw)

Return a new instance of the given worker pool.

Parameters:
  • name (str) – Type of requested pool.
  • processes (int) – Number of local cores to use for multicore pool. The default is read from GLIMPSE_MULTICORE_PROCS environment variable.
  • cluster_type (str) – Name of cluster sub-package (e.g., “ipython”).
  • cluster_args (dict) – Keyword arguments for cluster constructor (default is given by evaluating as a python expression the GLIMPSE_CLUSTER_ARGS environment variable).

Valid entries for name include:

“s” or “singlecore”
One core of the local machine are used.
“m” or “multicore”
Multiple cores of the local machine are used.
“c” or “cluster”
A group of remote machines are used.

If name is unset, the default is read from the GLIMPSE_POOL environment variable, or else the DEFAULT_POOL_TYPE global variable.

See also

GetClusterPackage() for information about on cluster_type argument.

GetClusterPackage(cluster_type=None)

Choose a cluster package by name.

Parameters:cluster_type (str) – Type of cluster to create (e.g., ipython). The default is read from the GLIMPSE_CLUSTER environment variable, or the DEFAULT_CLUSTER_TYPE if unset.

If cluster_type is “ipython”, for example, then this method returns glimpse.pools.ipythoncluster. The returned module is guaranteed to contain a MakePool() function.

Table Of Contents

Previous topic

glimpse.prototypes

Next topic

glimpse.pools.ipythoncluster

This Page