ivy Package

ivy Package

ivy.__init__.execute(args)[source]

Runs a workflow for the given arguments. :param args: list of arguments which should be passed to ivy. The last argument has to be the config

Returns:the global_ctx
ivy.__init__.reduce_method(m)[source]

backend Module

Created on Mar 18, 2014

author: jakeret

class ivy.backend.IpClusterBackend(ctx)[source]

Bases: object

Backend based on IPython cluster. Will distribute the workload among the available engines.

run(loop, mapPlugin)[source]
class ivy.backend.JoblibBackend(ctx)[source]

Bases: object

Backend based on the joblib package Will instantiate a multiprocessing pool with ctx.params.cpu_count processes.

run(loop, mapPlugin)[source]
class ivy.backend.LoopWrapper(loop, parallel=False)[source]

Bases: object

Callable wrapper for the loop execution

class ivy.backend.MultiprocessingBackend(ctx)[source]

Bases: object

Backend based on Python’s multiprocessing. Will instantiate a multiprocessing pool with ctx.params.cpu_count processes.

run(loop, mapPlugin)[source]
class ivy.backend.SequentialBackend(ctx)[source]

Bases: object

Simple implementation of a backend executing the plugins in a sequential order

run(loop, mapPlugin=None)[source]
class ivy.backend.SimpleMapPlugin(ctx)[source]

Bases: object

getWorkload()[source]
ivy.backend.create(ctx, force=None)[source]

Simple factory instantiating backends for the given name in ctx.params.backend

context Module

ivy.context.ctx()[source]

Returns the current global namespace context.

Returns:reference to the context module
ivy.context.loopCtx(loop)[source]

context_provider Module

Created on Mar 6, 2014

author: jakeret

class ivy.context_provider.DefaultContextProvider[source]

Bases: object

Default implementation of a context provider. Creates a simple mutable struct as ctx and doesn’t persist the context.

static createContext(**args)[source]

Returns a Struct

static createImmutableContext(**args)[source]

Returns a Struct

static storeContext()[source]

Dummy method. Nothing is stored

class ivy.context_provider.PickleContextProvider[source]

Bases: ivy.context_provider.DefaultContextProvider

Extends the DefaultContextProvider. Persists the context to the disk by using pickle. Requires the attribute ‘ctx_file_name’ in the ctx

static storeContext()[source]

Writes the current ctx to the disk

loop Module

Created on Mar 4, 2014

author: jakeret

class ivy.loop.Loop(pluginList, stop=None, ctx=None)[source]

Bases: object

Implementation of a loop.

Parameters:
  • pluginList – List of plugin or inner Loop
  • stop – (optional) stop criteria
next()[source]

Returns the next plugin. Allows for using a Loop as an iter

reset()[source]

Resets the internal state of the loop

workflow_manager Module

Created on Mar 4, 2014

author: jakeret

class ivy.workflow_manager.WorkflowManager(argv)[source]

Bases: object

Manages the workflow process by loading the passed config and parsing the passed arguments and then iterating thru the plugins.

Parameters:argv – arguments to use
launch()[source]

Launches the workflow

ivy.workflow_manager.loadConfigs(configs)[source]

Loads key-value configurations from Python modules.

Parameters:configs – string or list of strings with absolute module declaration e.g. “ivy.config.base_config
Return config:a Struct instance with the config attributes