(self, input_object)
return dict((output.name, results[output]) for output in self.outputs)
Runs the DAG on the given input.

    All pipelines in the DAG will run.

    Args:
      input_object: Any object. The required type depends on implementation.

    Returns:
      A dictionary mapping output names to lists of objects. The object types
      depend on implementation. Each output name corresponds to an output
      collection. See get_output_names method.
Runs the DAG on the given input.
Runs the DAG on the given input .
def transform(self, input_object):
    """Runs the DAG on the given input.

    All pipelines in the DAG will run.

    Args:
      input_object: Any object. The required type depends on implementation.

    Returns:
      A dictionary mapping output names to lists of objects. The object types
      depend on implementation. Each output name corresponds to an output
      collection. See get_output_names method.
    """
    def stats_accumulator(unit, unit_inputs, cumulative_stats):
      for single_input in unit_inputs:
        results_ = unit.transform(single_input)
        stats = unit.get_stats()
        cumulative_stats.extend(stats)
        yield results_

    stats = []
    results = {self.input: [input_object]}
    for unit in self.call_list[1:]:
      # Compute transformation.

      if isinstance(unit, DagOutput):
        unit_outputs = self._get_outputs_as_signature(self.dag[unit], results)
      else:
        unit_inputs = self._get_inputs_for_unit(unit, results)
        if not unit_inputs:
          # If this unit has no inputs don't run it.
          results[unit] = []
          continue

        unjoined_outputs = list(
            stats_accumulator(unit, unit_inputs, stats))
        unit_outputs = self._join_lists_or_dicts(unjoined_outputs, unit)
      results[unit] = unit_outputs

    self._set_stats(stats)
    return dict((output.name, results[output]) for output in self.outputs)
def transform ( self , input_object ) : def stats_accumulator ( unit , unit_inputs , cumulative_stats ) : for single_input in unit_inputs : results_ = unit . transform ( single_input ) stats = unit . get_stats ( ) cumulative_stats . extend ( stats ) yield results_ stats = [ ] results = { self . input : [ input_object ] } for unit in self . call_list [ 1 : ] : # Compute transformation. if isinstance ( unit , DagOutput ) : unit_outputs = self . _get_outputs_as_signature ( self . dag [ unit ] , results ) else : unit_inputs = self . _get_inputs_for_unit ( unit , results ) if not unit_inputs : # If this unit has no inputs don't run it. results [ unit ] = [ ] continue unjoined_outputs = list ( stats_accumulator ( unit , unit_inputs , stats ) ) unit_outputs = self . _join_lists_or_dicts ( unjoined_outputs , unit ) results [ unit ] = unit_outputs self . _set_stats ( stats ) return dict ( ( output . name , results [ output ] ) for output in self . outputs )