class_docstr: Loader for an entire directory, maintaining multiple active file
  loaders.
  
  This class takes a directory, a factory for loaders, and optionally a
  path filter and watches all the paths inside that directory for new data.
  Each file loader created by the factory must read a path and produce an
  iterator of (timestamp, value) pairs.
  
  Unlike DirectoryWatcher, this class does not assume that only one file
  receives new data at a time; there can be arbitrarily many active files.
  However, any file whose maximum load timestamp fails an "active" predicate
  will be marked as inactive and no longer checked for new data.
docstr: Constructs a new MultiFileDirectoryLoader.
  
  Args:
    directory: The directory to load files from.
    loader_factory: A factory for creating loaders. The factory should take a
      path and return an object that has a Load method returning an iterator
      yielding (unix timestamp as float, value) pairs for any new data
    path_filter: If specified, only paths matching this filter are loaded.
    active_filter: If specified, any loader whose maximum load timestamp does
      not pass this filter will be marked as inactive and no longer read.
  
  Raises:
    ValueError: If directory or loader_factory are None.
code: def __init__(
      self,
      directory,
      loader_factory,
      path_filter=lambda x: True,
      active_filter=lambda timestamp: True,
  ):
      """Constructs a new MultiFileDirectoryLoader.
  
      Args:
        directory: The directory to load files from.
        loader_factory: A factory for creating loaders. The factory should take a
          path and return an object that has a Load method returning an iterator
          yielding (unix timestamp as float, value) pairs for any new data
        path_filter: If specified, only paths matching this filter are loaded.
        active_filter: If specified, any loader whose maximum load timestamp does
          not pass this filter will be marked as inactive and no longer read.
  
      Raises:
        ValueError: If directory or loader_factory are None.
      """
      if directory is None:
          raise ValueError("A directory is required")
      if loader_factory is None:
          raise ValueError("A loader factory is required")
      self._directory = directory
      self._loader_factory = loader_factory
      self._path_filter = path_filter
      self._active_filter = active_filter
      self._loaders = {}
      self._max_timestamps = {}
  
file_path: tensorboard/tensorboard/backend/event_processing/directory_loader.py
imports: from tensorboard.backend.event_processing import directory_watcher
  from tensorboard.backend.event_processing import io_wrapper
  from tensorboard.compat import tf
  from tensorboard.util import tb_logging
label_desc: Use image node_id 1 to create a new DirectoryLoader object  with example: obj = DirectoryLoader(directory, loader_factory, path_filter, active_filter)