class_docstr: Experiment runner.
  
  This class implements routines to train, evaluate and make predictions from models.
class_docstr_tok: ["Experiment","runner",".","This","class","implements","routines","to","train",",","evaluate","and","make","predictions","from","models","."]
docstr: predict(model, dataset, output_attributes=False, device=None, batch_size=32,             progress_style='bar', log_freq=5, sort_in_buckets=None)
  
  Use a :class:`deepmatcher.MatchingModel` to obtain predictions, i.e., match scores
  on the specified dataset.
  
  Returns:
      pandas.DataFrame: A pandas DataFrame containing tuple pair IDs (in the "id"
          column) and the corresponding match score predictions (in the
          "match_score" column). Will also include all attributes in the original
          CSV file of the dataset if `output_attributes` is True.
docstr_tok: ["predict","(","model",",","dataset",",","output_attributes=False",",","device=None",",","batch_size=32",",","progress_style='bar","'",",","log_freq=5",",","sort_in_buckets=None",")","Use","a",":","class",":","`","deepmatcher.MatchingModel","`","to","obtain","predictions",",","i.e.",",","match","scores","on","the","specified","dataset",".","Returns",":","pandas.DataFrame",":","A","pandas","DataFrame","containing","tuple","pair","IDs","(","in","the","``","id","''","column",")","and","the","corresponding","match","score","predictions","(","in","the","``","match_score","''","column",")",".","Will","also","include","all","attributes","in","the","original","CSV","file","of","the","dataset","if","`","output_attributes","`","is","True","."]
code: def predict(model, dataset, output_attributes=False, **kwargs):
      """predict(model, dataset, output_attributes=False, device=None, batch_size=32, \
              progress_style='bar', log_freq=5, sort_in_buckets=None)
  
          Use a :class:`deepmatcher.MatchingModel` to obtain predictions, i.e., match scores
          on the specified dataset.
  
          Returns:
              pandas.DataFrame: A pandas DataFrame containing tuple pair IDs (in the "id"
                  column) and the corresponding match score predictions (in the
                  "match_score" column). Will also include all attributes in the original
                  CSV file of the dataset if `output_attributes` is True.
          """
      # Create a shallow copy of the model and reset embeddings to use vocab and
      # embeddings from new dataset.
      model = copy.deepcopy(model)
      model._reset_embeddings(dataset.vocabs)
  
      predictions = Runner._run(
          "PREDICT", model, dataset, return_predictions=True, **kwargs
      )
      pred_table = pd.DataFrame(
          predictions, columns=(dataset.id_field, "match_score")
      )
      pred_table = pred_table.set_index(dataset.id_field)
  
      if output_attributes:
          raw_table = pd.read_csv(dataset.path).set_index(
              dataset.id_field
          )
          raw_table.index = raw_table.index.astype("str")
          pred_table = pred_table.join(raw_table)
  
      return pred_table
  
imports: import copy
  import logging
  import sys
  import time
  import warnings
  from collections import OrderedDict
  import pandas
  import pyprind
  import torch
  from tqdm import tqdm
  from .data import MatchingIterator
  from .optim import Optimizer, SoftNLLLoss
  from .utils import tally_parameters
label_desc: Use image node_id 8 for calling the Runner obj's underlying member method code with example usage: obj.predict(model, dataset, output_attributes) and returns: pred_table