kernel.mapper

Module: kernel.mapper

Inheritance diagram for IPython.kernel.mapper:

A parallelized version of Python’s builtin map.

Classes

IMapper

class IPython.kernel.mapper.IMapper(name, bases=(), attrs=None, __doc__=None, __module__=None)

Bases: zope.interface.Interface

The basic interface for a Mapper.

This defines a generic interface for mapping. The idea of this is similar to that of Python’s builtin map function, which applies a function elementwise to a sequence.

classmethod __init__()

IMultiEngineMapperFactory

class IPython.kernel.mapper.IMultiEngineMapperFactory(name, bases=(), attrs=None, __doc__=None, __module__=None)

Bases: zope.interface.Interface

An interface for something that creates IMapper instances.

classmethod __init__()

ITaskMapperFactory

class IPython.kernel.mapper.ITaskMapperFactory(name, bases=(), attrs=None, __doc__=None, __module__=None)

Bases: zope.interface.Interface

An interface for something that creates IMapper instances.

classmethod __init__()

MultiEngineMapper

class IPython.kernel.mapper.MultiEngineMapper(multiengine, dist='b', targets='all', block=True)

Bases: object

A Mapper for IMultiEngine implementers.

__init__()

Create a Mapper for a multiengine.

The value of all arguments are used for all calls to map. This class allows these arguemnts to be set for a series of map calls.

Parameters :
multiengine : IMultiEngine implementer

The multiengine to use for running the map commands

dist : str

The type of decomposition to use. Only block (‘b’) is supported currently

targets : (str, int, tuple of ints)

The engines to use in the map

block : boolean

Whether to block when the map is applied

map()

Apply func to *sequences elementwise. Like Python’s builtin map.

This version is not load balanced.

SynchronousTaskMapper

class IPython.kernel.mapper.SynchronousTaskMapper(task_controller, clear_before=False, clear_after=False, retries=0, recovery_task=None, depend=None, block=True)

Bases: object

Make an IBlockingTaskClient look like an IMapper.

This class provides a load balanced version of map.

__init__()

Create a IMapper given a IBlockingTaskClient and arguments.

The additional arguments are those that are common to all types of tasks and are described in the documentation for IPython.kernel.task.BaseTask.

Parameters :
task_controller : an IBlockingTaskClient implementer

The TaskController to use for calls to map

map()

Apply func to *sequences elementwise. Like Python’s builtin map.

This version is load balanced.

TaskMapper

class IPython.kernel.mapper.TaskMapper(task_controller, clear_before=False, clear_after=False, retries=0, recovery_task=None, depend=None, block=True)

Bases: object

Make an ITaskController look like an IMapper.

This class provides a load balanced version of map.

__init__()

Create a IMapper given a TaskController and arguments.

The additional arguments are those that are common to all types of tasks and are described in the documentation for IPython.kernel.task.BaseTask.

Parameters :
task_controller : an IBlockingTaskClient implementer

The TaskController to use for calls to map

map()

Apply func to *sequences elementwise. Like Python’s builtin map.

This version is load balanced.

Table Of Contents

Previous topic

kernel.map

Next topic

kernel.multiengine

This Page