docstr: Adds additional information to input DataFrames.
  
  Adds prediction and f1 information from model1_df to model2_df and
  vice versa. Additionally computes the f1 deltas.
  
  Args:
      model1_df: DataFrame for first model.
      model2_df: DataFrame for second model.
  
  Returns:
      The modified versions of both DataFrames.
docstr_tok: ["Adds","additional","information","to","input","DataFrames",".","Adds","prediction","and","f1","information","from","model1_df","to","model2_df","and","vice","versa",".","Additionally","computes","the","f1","deltas",".","Args",":","model1_df",":","DataFrame","for","first","model",".","model2_df",":","DataFrame","for","second","model",".","Returns",":","The","modified","versions","of","both","DataFrames","."]
code: def _process_all_df(
      self, dfs: Dict[str, pd.DataFrame]
  ) -> Dict[str, pd.DataFrame]:
      """Adds additional information to input DataFrames.
  
      Adds prediction and f1 information from model1_df to model2_df and
      vice versa. Additionally computes the f1 deltas.
  
      Args:
          model1_df: DataFrame for first model.
          model2_df: DataFrame for second model.
  
      Returns:
          The modified versions of both DataFrames.
      """
      if self.mode == "normal":
          (model1_df,) = dfs.values()
          model1_df = model1_df.rename(
              columns={
                  "f1": f"f1_{self.map_model_id_to_name['model1']}",
                  "pred": f"pred_{self.map_model_id_to_name['model1']}",
              }
          )
          domains = model1_df["domain"].unique()
          self.domain_map = {
              domain: val for val, domain in enumerate(domains)
          }
          model1_df["domain"] = model1_df["domain"].map(self.domain_map)
          new_df = {}
          new_df["model1"] = model1_df
      else:
          # TODO: Merge both DataFrames into one
          model1_df, model2_df = dfs.values()
          model1_df = model1_df.rename(
              columns={
                  "f1": f"f1_{self.map_model_id_to_name['model1']}",
                  "pred": f"pred_{self.map_model_id_to_name['model1']}",
              }
          )
          model2_df = model2_df.rename(
              columns={
                  "f1": f"f1_{self.map_model_id_to_name['model2']}",
                  "pred": f"pred_{self.map_model_id_to_name['model2']}",
              }
          )
  
          # Need aspect key for merge for case where aspect get truncated (problem when using pivot phrase due to 64 max seq length truncation)
          model1_full_df = model1_df.merge(
              model2_df[
                  [
                      "aspect",
                      "id",
                      f"f1_{self.map_model_id_to_name['model2']}",
                      f"pred_{self.map_model_id_to_name['model2']}",
                  ]
              ],
              on=["id", "aspect"],
              how="inner",
          )
          model2_full_df = model2_df.merge(
              model1_df[
                  [
                      "aspect",
                      "id",
                      f"f1_{self.map_model_id_to_name['model1']}",
                      f"pred_{self.map_model_id_to_name['model1']}",
                  ]
              ],
              on=["id", "aspect"],
              how="inner",
          )
  
          model1_full_df["f1_delta"] = (
              model1_full_df[
                  f"f1_{self.map_model_id_to_name['model1']}"
              ]
              - model1_full_df[
                  f"f1_{self.map_model_id_to_name['model2']}"
              ]
          )
          model2_full_df["f1_delta"] = (
              model2_full_df[
                  f"f1_{self.map_model_id_to_name['model2']}"
              ]
              - model2_full_df[
                  f"f1_{self.map_model_id_to_name['model1']}"
              ]
          )
  
          model1_full_df = model1_full_df.drop_duplicates()
          model2_full_df = model2_full_df.drop_duplicates()
  
          # Creating numeric mapping for domain labels in dataframe
          domains = pd.concat(
              [model1_full_df["domain"], model2_full_df["domain"]]
          ).unique()
          self.domain_map = {
              domain: val for val, domain in enumerate(domains)
          }
          model1_full_df["domain"] = model1_full_df["domain"].map(
              self.domain_map
          )
          model2_full_df["domain"] = model2_full_df["domain"].map(
              self.domain_map
          )
  
          new_df = {}
          new_df["model1"] = model1_full_df
          new_df["model2"] = model2_full_df
  
      return new_df
  
imports: from typing import List, Tuple, Dict, Union
  from abc import ABC, abstractmethod
  import torch
  import pandas
  import numpy
label_desc: Use image node_id 7 for calling the ABSATask obj's underlying member method code with example usage: obj._process_all_df(dfs) and returns: new_df