class_docstr: Executor for HelloComponent.
class_docstr_tok: ["Executor","for","HelloComponent","."]
docstr: Copy the input_data to the output_data.
  
  For this example that is all that the Executor does.  For a different
  custom component, this is where the real functionality of the component
  would be included.
  
  This component both reads and writes Examples, but a different component
  might read and write artifacts of other types.
  
  Args:
    input_dict: Input dict from input key to a list of artifacts, including:
      - input_data: A list of type `standard_artifacts.Examples` which will
        often contain two splits, 'train' and 'eval'.
    output_dict: Output dict from key to a list of artifacts, including:
      - output_data: A list of type `standard_artifacts.Examples` which will
        usually contain the same splits as input_data.
    exec_properties: A dict of execution properties, including:
      - name: Optional unique name. Necessary iff multiple Hello components
        are declared in the same pipeline.
  
  Returns:
    None
  
  Raises:
    OSError and its subclasses
docstr_tok: ["Copy","the","input_data","to","the","output_data",".","For","this","example","that","is","all","that","the","Executor","does",".","For","a","different","custom","component",",","this","is","where","the","real","functionality","of","the","component","would","be","included",".","This","component","both","reads","and","writes","Examples",",","but","a","different","component","might","read","and","write","artifacts","of","other","types",".","Args",":","input_dict",":","Input","dict","from","input","key","to","a","list","of","artifacts",",","including",":","-","input_data",":","A","list","of","type","`","standard_artifacts.Examples","`","which","will","often","contain","two","splits",",","'train","'","and","'eval","'",".","output_dict",":","Output","dict","from","key","to","a","list","of","artifacts",",","including",":","-","output_data",":","A","list","of","type","`","standard_artifacts.Examples","`","which","will","usually","contain","the","same","splits","as","input_data",".","exec_properties",":","A","dict","of","execution","properties",",","including",":","-","name",":","Optional","unique","name",".","Necessary","iff","multiple","Hello","components","are","declared","in","the","same","pipeline",".","Returns",":","None","Raises",":","OSError","and","its","subclasses"]
code: def Do(
      self,
      input_dict: Dict[str, List[types.Artifact]],
      output_dict: Dict[str, List[types.Artifact]],
      exec_properties: Dict[str, Any],
  ) -> None:
      """Copy the input_data to the output_data.
  
      For this example that is all that the Executor does.  For a different
      custom component, this is where the real functionality of the component
      would be included.
  
      This component both reads and writes Examples, but a different component
      might read and write artifacts of other types.
  
      Args:
        input_dict: Input dict from input key to a list of artifacts, including:
          - input_data: A list of type `standard_artifacts.Examples` which will
            often contain two splits, 'train' and 'eval'.
        output_dict: Output dict from key to a list of artifacts, including:
          - output_data: A list of type `standard_artifacts.Examples` which will
            usually contain the same splits as input_data.
        exec_properties: A dict of execution properties, including:
          - name: Optional unique name. Necessary iff multiple Hello components
            are declared in the same pipeline.
  
      Returns:
        None
  
      Raises:
        OSError and its subclasses
      """
      self._log_startup(input_dict, output_dict, exec_properties)
  
      input_artifact = artifact_utils.get_single_instance(
          input_dict["input_data"]
      )
      output_artifact = artifact_utils.get_single_instance(
          output_dict["output_data"]
      )
      output_artifact.split_names = input_artifact.split_names
  
      split_to_instance = {}
  
      for split in json.loads(input_artifact.split_names):
          uri = artifact_utils.get_split_uri([input_artifact], split)
          split_to_instance[split] = uri
  
      for split, instance in split_to_instance.items():
          input_dir = instance
          output_dir = artifact_utils.get_split_uri(
              [output_artifact], split
          )
          for filename in fileio.listdir(input_dir):
              input_uri = os.path.join(input_dir, filename)
              output_uri = os.path.join(output_dir, filename)
              io_utils.copy_file(
                  src=input_uri, dst=output_uri, overwrite=True
              )
  
file_path: tfx/tfx/examples/custom_components/hello_world/hello_component/executor.py
imports: import json
  import os
  from typing import Any, Dict, List
  from tfx import types
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.io import fileio
  from tfx.types import artifact_utils
  from tfx.utils import io_utils
label_desc: Use image node_id 1 for calling the Executor obj's underlying member method code with example usage: obj.Do(input_dict, output_dict, exec_properties) without return types