Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | List of all members
task.Node Class Reference
Inheritance diagram for task.Node:

Public Member Functions

def __init__ (self, node='local', kwargs)
 
def __str__ (self)
 
def kwargs (self)
 

Detailed Description

A Node context is used to indicate that all Tasks instantiated within will
run on the given node name. (Only the name of the node actually counts.)
Example:

    with TaskGroup() as tg:
        with Node('node1'):
            s1 = execution_step(...)
            Task(step=s1)
        with Node('node2'):
            s2 = execution_step(...)
        with Node('node1'):
            s3 = execution_step(...)

    In this example, all three execution steps will run in parallel.
    Moreover, s1 and s3 will run on the same node, and can see each
    others blobs.

    Additionally, a Node can be passed implementation-specific kwargs,
    in order to specify properties of the node. When using AML Flow,
    we currently support:
        resource_requirements: a fblearner.flow.api.ResourceRequirements
                               specifying requirements for this Node.
        flow_returns: a fblearner.flow.api.types.Schema object specifying
                      the output schema of the Flow operator where the
                      Node will run.

Definition at line 56 of file task.py.


The documentation for this class was generated from the following file: