Autodist

User Interface.

set_default_autodist(o)[source]

Set the AutoDist object the scope of which you are in.

get_default_autodist()[source]

Get the AutoDist object the scope of which you are in.

class AutoDist(*args, **kwargs)[source]

Bases: autodist.autodist._V1Graph, autodist.autodist._V2Graph, autodist.autodist._V2Eager

AutoDist is a scalable ML engine.

AutoDist provides user-friendly interfaces to distribute local deep-learning model training across multiple processing units with scalability and minimal code changes.

Parameters
  • resource_spec_file (str) – file path of a resource specification yaml

  • strategy_builder (base.StrategyBuilder) – (optional) a strategy builder object

scope()[source]

Create a context manager capturing the code block to be distributed.

Yields

AutoDist context

build_strategy()[source]

Build distributed strategy based on the default graph in the scope.

Returns

Distributed strategy representation object.

Return type

base.Strategy

create_distributed_session()[source]

Create a Session object to execute the default graph in a distributed manner.

Returns

A wrapped TensorFlow Session object.

Return type

WrappedSession

function(fn)[source]

Experimental interface similar to tf.function.

is_built()[source]

Whether the distributed graph is built for the most recent original graph.

Returns

True if the distributed graph is built by AutoDist

Return type

bool