class_docstr: Task is an entity object to represent an experiment run. A snapshot is taken before and after the task
  to capture the relevant components. These snapshots are flagged as temporary unless otherwise specified
  by the user but are stored as ids within the task object for reference.
  
  Note
  ----
  All attributes of the class in the ``Attributes`` section must be serializable by the DB
  
  Parameters
  ----------
  dictionary : dict
      id : str, optional
          the id of the entity
          (default is None; storage driver has not assigned an id yet)
      model_id : str
          the parent model id for the entity
      before_snapshot_id : str, optional
          snapshot created before the task is run
          (default is None, which means it isn't set yet)
      command : str, optional
          command that is used by the task
          (default is None, which means it isn't set yet)
      command_list : list or None
          command that is used by the task in list form (same as above)
          (default is None, which means it isn't set yet)
      data_file_path_map: list
          list of tuple, mapping the source absolute file path to destination relative file path
      data_directory_path_map: list
          list of tuple, mapping the source absolute directory path to destination relative directory path
      interactive : bool, optional
          boolean to signify if task should be run in interactive mode
          (default is False, which means no interactive mode unless specified)
      detach : bool, optional
          boolean to signify if task should be run in detach mode
          (default is False, which means output will not be shown in stdout)
      ports : list, optional
          list of string mappings from host system (left) to environment (right)
          (e.g. ["9999:9999", "8888:8888"])
          (default is None, which means it isn't set yet)
      mem_limit : string, optional
          maximum amount of memory the environment can use
          (these options take a positive integer, followed by a suffix of b, k, m, g, to indicate bytes, kilobytes,
          megabytes, or gigabytes. memory limit is contrained by total memory of the VM in which docker runs)
      task_dirpath : str, optional
          task directory path relative to the project root
          (default is None, which means it isn't set yet)
      log_filepath : str, optional
          log filepath relative to the project root
          (default is None, which means it isn't set yet)
      start_time : datetime.datetime, optional
          timestamp for the beginning time of the task
          (default is None, which means it isn't set yet)
      after_snapshot_id : str, optional
          snapshot created after the task is run
          (default is None, which means it isn't set yet)
      run_id : str, optional
          run id for the run (different from environment id and task id)
          (default is None, which means it isn't set yet)
      logs : str, optional
          string output of logs
          (default is None, which means it isn't set yet)
      status : str, optional
          status of the current task
          (default is None, which means it isn't set yet)
      results : dict, optional
          dictionary containing output results from the task
          (default is None, which means it isn't set yet)
      end_time : datetime.datetime, optional
          timestamp for the beginning time of the task
          (default is None, which means it isn't set yet)
      duration : float, optional
          float object signifying number of seconds for run
          (default is None, which means it isn't set yet)
      created_at : datetime.datetime, optional
          (default is datetime.utcnow(), at time of instantiation)
      updated_at : datetime.datetime, optional
          (default is same as created_at, at time of instantiation)
  
  Attributes
  ----------
  id : str
      the id of the entity
  model_id : str
      the parent model id for the entity
  before_snapshot_id : str or None
      snapshot created before the task is run
  command : str or None
      command that is used by the task
  command_list : list or None
      command that is used by the task in list form (same as above)
  interactive : bool
      boolean to signify if task should be run in interactive mode
  detach : bool
      boolean to signify if task should be run in detach mode
  gpu : bool
      boolean to signify gpu task
  ports : list or None
      list of string mappings from host system (left) to environment (right)
      (e.g. ["9999:9999", "8888:8888"])
  task_dirpath : str or None
      task directory path relative to the project root
  data_file_path_map: list
          list of tuple, mapping the source absolute file path to destination relative file path
  data_directory_path_map: list
      list of tuple, mapping the source absolute directory path to destination relative directory path
  log_filepath : str or None
      log filepath relative to the project root
  start_time : datetime.datetime or None
      timestamp for the beginning time of the task
  after_snapshot_id : str or None
      snapshot created after the task is run
  run_id : str or None
      run id for the run (different from environment id and task id)
  logs : str or None
      string output of logs
  status : str or None
      status of the current task
  results : dict or None
      dictionary containing output results from the task
  end_time : datetime.datetime or None
      timestamp for the beginning time of the task
  duration : float or None
      float object signifying number of seconds for run
  created_at : datetime.datetime
  updated_at : datetime.datetime
code: def to_dictionary(self):
      attr_dict = self.__dict__
      pruned_attr_dict = {
          attr: val
          for attr, val in attr_dict.items()
          if not callable(getattr(self, attr))
          and not attr.startswith("__")
      }
      return pruned_attr_dict
  
file_path: datmo/datmo/core/entity/task.py
imports: import os
  from datetime import datetime
  from datmo.core.util.misc_functions import prettify_datetime, format_table
label_desc: Use image node_id 5 for calling the Task obj's underlying member method code with example usage: obj.to_dictionary() and returns: pruned_attr_dict