class_docstr: Common interface for pipeline executor factory modules.
  
  Parameters
  ----------
  pipeline_mods : List[GraphExecutorFactoryModule]
      List of GraphExecutorFactoryModule.
  
  mod_config : Dict[int, Dict[str, Any]]
      Modules dependency configuration information.
class_docstr_tok: ["Common","interface","for","pipeline","executor","factory","modules",".","Parameters","--","--","--","--","--","pipeline_mods",":","List","[","GraphExecutorFactoryModule","]","List","of","GraphExecutorFactoryModule",".","mod_config",":","Dict","[","int",",","Dict","[","str",",","Any","]","]","Modules","dependency","configuration","information","."]
docstr: Export the pipeline executor into disk files.
  
  Parameters
  ----------
  directory_path : str
      Export the files to this directory.
docstr_tok: ["Export","the","pipeline","executor","into","disk","files",".","Parameters","--","--","--","--","--","directory_path",":","str","Export","the","files","to","this","directory","."]
code: def export_library(self, directory_path):
      """Export the pipeline executor into disk files.
  
      Parameters
      ----------
      directory_path : str
          Export the files to this directory.
      """
      if not self.pipeline_mods:
          raise RuntimeError(
              "The pipeline executor has not been initialized."
          )
  
      # Check if the directory_path exists.
      if not os.path.exists(directory_path):
          raise RuntimeError(
              "The directory {directory_path} does not exist."
          )
      # Create an load configuration.
      load_config_file_name = f"{directory_path}/load_config"
      pipeline_config_file_name = f"{directory_path}/pipeline_config"
      config = {}
      config["load_config"] = load_config_file_name
      config["pipeline_config"] = pipeline_config_file_name
      load_config = []
      # Export the library, JSON, and parameter into files, then export these files path
      # into a configuration file.
      for lib_index in self.pipeline_mods:
          mconfig = {}
          mconfig["mod_idx"] = lib_index
          mconfig["lib_name"] = f"{directory_path}/lib{lib_index}.so"
          mconfig["json_name"] = f"{directory_path}/json{lib_index}"
          mconfig["params_name"] = f"{directory_path}/params{lib_index}"
          mconfig["dev"] = (
              f"{self.pipeline_mods[lib_index]['dev'].device_type},"
              f"{self.pipeline_mods[lib_index]['dev'].device_id}"
          )
          # Get the graph, lib, and parameters from GraphExecutorFactoryModule.
          lib = self.pipeline_mods[lib_index]["lib"]
          # Export the lib, graph, and parameters to disk.
          if self.pipeline_mods[lib_index]["export_cc"]:
              lib.export_library(
                  mconfig["lib_name"],
                  cc=self.pipeline_mods[lib_index]["export_cc"],
              )
          else:
              lib.export_library(mconfig["lib_name"])
  
          with open(mconfig["json_name"], "w") as file_handle:
              file_handle.write(lib.graph_json)
          with open(mconfig["params_name"], "wb") as file_handle:
              file_handle.write(runtime.save_param_dict(lib.params))
  
          load_config.append(mconfig)
  
      with open(load_config_file_name, "w") as file_handle:
          json.dump(load_config, file_handle)
  
      with open(pipeline_config_file_name, "w") as file_handle:
          json.dump(self.mods_config, file_handle)
  
      config_file_name = f"{directory_path}/config"
      with open(config_file_name, "w") as file_handle:
          json.dump(config, file_handle)
  
      return config_file_name
  
imports: import json
  import os
  import time
  from tvm import runtime
  from tvm._ffi import get_global_func
  from tvm.contrib import graph_executor
label_desc: Use image node_id 4 for calling the PipelineExecutorFactoryModule obj's underlying member method code with example usage: obj.export_library(directory_path) and returns: config_file_name