This module provide an algorithm to evaluate a dataflow

exception core.algo.dataflow_evaluation.EvaluationException(vid, node, exception, exc_info)[source]

Bases: exceptions.Exception

class core.algo.dataflow_evaluation.AbstractEvaluation(dataflow)[source]

Bases: object

eval(*args)[source]

todo

eval_vertex_code(vid)[source]

Evaluate the vertex vid. Can raise an exception if evaluation failed.

get_parent_nodes(pid)[source]

Return the list of parent node connected to pid The list contains tuples (port_pid, node_pid, actor) This list is sorted by the x value of the node

is_stopped(vid, actor)[source]

Return True if evaluation must be stop at this vertex.

set_provenance(provenance)[source]
class core.algo.dataflow_evaluation.BrutEvaluation(dataflow)[source]

Bases: core.algo.dataflow_evaluation.AbstractEvaluation

Basic evaluation algorithm

eval(*args)[source]

Evaluate the whole dataflow starting from leaves

eval_vertex(vid, *args)[source]

Evaluate the vertex vid

is_stopped(vid, actor)[source]

Return True if evaluation must be stop at this vertex

core.algo.dataflow_evaluation.DefaultEvaluation

alias of LambdaEvaluation

class core.algo.dataflow_evaluation.DiscreteTimeEvaluation(dataflow)[source]

Bases: core.algo.dataflow_evaluation.AbstractEvaluation

Evaluation algorithm with generator / priority and selection

clear()[source]

Clear evaluation variable

eval(vtx_id=None, step=False)[source]
eval_vertex(vid)[source]

Evaluate the vertex vid

is_stopped(vid, actor)[source]

Return True if evaluation must be stop at this vertex

next_step()[source]

Update the scheduler of one step.

class core.algo.dataflow_evaluation.GeneratorEvaluation(dataflow)[source]

Bases: core.algo.dataflow_evaluation.AbstractEvaluation

Evaluation algorithm with generator / priority and selection

clear()[source]

Clear evaluation variable

eval(vtx_id=None, step=False)[source]
eval_vertex(vid)[source]

Evaluate the vertex vid

is_stopped(vid, actor)[source]

Return True if evaluation must be stop at this vertex

class core.algo.dataflow_evaluation.LambdaEvaluation(dataflow)[source]

Bases: core.algo.dataflow_evaluation.PriorityEvaluation

Evaluation algorithm with support of lambda / priority and selection

eval(vtx_id=None, context=None, is_subdataflow=False, step=False)[source]

Eval the dataflow from vtx_id with a particular context

Parameters:
  • vtx_id -- vertex id to start the evaluation
  • context -- list a value to assign to lambda variables
eval_vertex(vid, context, lambda_value, *args)[source]

Evaluate the vertex vid

This function is called both by the user (eval a node and its parents) and by the SubDataFlow evaluation.

First the graph is traversed by the algorithm in a bottom-up way. The SubDataflow is stored in the inputs.

Parameters:context -- is a list a value to assign to lambdas
class core.algo.dataflow_evaluation.PrintProvenance(workflow)[source]

Bases: core.algo.dataflow_evaluation.Provenance

node_exec(vid, node, start_time, end_time, *args)[source]
workflow_exec(*args)[source]
class core.algo.dataflow_evaluation.PriorityEvaluation(dataflow)[source]

Bases: core.algo.dataflow_evaluation.BrutEvaluation

Support priority between nodes and selective

eval(vtx_id=None, *args, **kwds)[source]

todo

class core.algo.dataflow_evaluation.Provenance(workflow)[source]

Bases: object

clear()[source]
edges()[source]
end_time()[source]
node_exec(vid, node, start_time, end_time, *args)[source]
start_time()[source]
workflow_exec(*args)[source]
write()[source]

Write the provenance in db

class core.algo.dataflow_evaluation.SciFlowareEvaluation(dataflow)[source]

Bases: core.algo.dataflow_evaluation.AbstractEvaluation

Distributed Evaluation algorithm with SciFloware backend

eval(vtx_id=None, **kwds)[source]
eval_vertex(vid)[source]

Evaluate the vertex vid

This evaluation is both a kind of compilation and real evaluation. Algorithm --------- For each vertex which is a SciFloware operator (e.g. map, reduce, ...),

  • select the vertices connected to each input port

  • if the name of the port is Dataflow:
    • get its name and send it as input to the operator
  • else
    • normal evaluation
static is_operator(actor)[source]
scifloware_actors()[source]

Compute the scifloware actors.

Only those actors will be evaluated.

class core.algo.dataflow_evaluation.ToScriptEvaluation(dataflow)[source]

Bases: core.algo.dataflow_evaluation.AbstractEvaluation

Basic transformation into script algorithm

eval(*args, **kwds)[source]

Evaluate the whole dataflow starting from leaves

eval_vertex(vid, *args)[source]

Evaluate the vertex vid

is_stopped(vid, actor)[source]

Return True if evaluation must be stop at this vertex

core.algo.dataflow_evaluation.cmp_posx(x, y)[source]

todo

core.algo.dataflow_evaluation.cmp_priority(x, y)[source]

todo

core.algo.dataflow_evaluation.db_connexion()[source]

Return a curso on the database.

If the database does not exists, create it.

core.algo.dataflow_evaluation.db_create(cursor)[source]
core.algo.dataflow_evaluation.get_database_name()[source]
core.algo.dataflow_evaluation.provenance(vid, node, start_time, end_time)[source]

Previous topic

<no title>

Next topic

core.control package

This Page