class_docstr: MLMD mixins for testing ResolverOps and resolver functions.
class_docstr_tok: ["MLMD","mixins","for","testing","ResolverOps","and","resolver","functions","."]
docstr: Add an Execution to MLMD where a Trainer trains on the examples.
code: def train_on_examples(
      self,
      model: types.Artifact,
      examples: List[types.Artifact],
      transform_graph: Optional[types.Artifact] = None,
      contexts: Sequence[metadata_store_pb2.Context] = (),
  ):
      """Add an Execution to MLMD where a Trainer trains on the examples."""
      inputs = {"examples": self.unwrap_tfx_artifacts(examples)}
      if transform_graph is not None:
          inputs["transform_graph"] = self.unwrap_tfx_artifacts(
              [transform_graph]
          )
      self.put_execution(
          "TFTrainer",
          inputs=inputs,
          outputs={"model": self.unwrap_tfx_artifacts([model])},
          contexts=contexts,
      )
  
imports: from typing import Type, Any, Dict, List, Optional, Sequence, Tuple, Union, Mapping
  from unittest import mock
  from absl.testing import parameterized
  from tfx import types
  from tfx.dsl.compiler import compiler_context
  from tfx.dsl.compiler import node_inputs_compiler
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_driver
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import executor_spec
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import ops_utils
  from tfx.orchestration import pipeline
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types import channel
  from tfx.types import component_spec
  from tfx.utils import test_case_utils
  from tfx.utils import typing_utils
  import ml_metadata
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 6 for calling the ResolverTestCase obj's underlying member method code with example usage: obj.train_on_examples(model, examples, transform_graph, contexts) without return types