class_docstr: Evaluates how well a perturbed attacked_text object is achieving a
  specified goal.
  
  Args:
      model_wrapper (:class:`~textattack.models.wrappers.ModelWrapper`):
          The victim model to attack.
      maximizable(:obj:`bool`, `optional`, defaults to :obj:`False`):
          Whether the goal function is maximizable, as opposed to a boolean result of success or failure.
      query_budget (:obj:`float`, `optional`, defaults to :obj:`float("in")`):
          The maximum number of model queries allowed.
      model_cache_size (:obj:`int`, `optional`, defaults to :obj:`2**20`):
          The maximum number of items to keep in the model results cache at once.
class_docstr_tok: ["Evaluates","how","well","a","perturbed","attacked_text","object","is","achieving","a","specified","goal",".","Args",":","model_wrapper","(",":","class",":","`","~textattack.models.wrappers.ModelWrapper","`",")",":","The","victim","model","to","attack",".","maximizable","(",":","obj",":","`","bool","`",",","`","optional","`",",","defaults","to",":","obj",":","`","False","`",")",":","Whether","the","goal","function","is","maximizable",",","as","opposed","to","a","boolean","result","of","success","or","failure",".","query_budget","(",":","obj",":","`","float","`",",","`","optional","`",",","defaults","to",":","obj",":","`","float","(","``","in","''",")","`",")",":","The","maximum","number","of","model","queries","allowed",".","model_cache_size","(",":","obj",":","`","int","`",",","`","optional","`",",","defaults","to",":","obj",":","`","2","*","*","20","`",")",":","The","maximum","number","of","items","to","keep","in","the","model","results","cache","at","once","."]
docstr: Queries model and returns outputs for a list of AttackedText
  objects.
docstr_tok: ["Queries","model","and","returns","outputs","for","a","list","of","AttackedText","objects","."]
code: def _call_model_uncached(self, attacked_text_list):
      """Queries model and returns outputs for a list of AttackedText
      objects."""
      if not len(attacked_text_list):
          return []
  
      inputs = [at.tokenizer_input for at in attacked_text_list]
      outputs = []
      i = 0
      while i < len(inputs):
          batch = inputs[i : i + self.batch_size]
          batch_preds = self.model(batch)
  
          # Some seq-to-seq models will return a single string as a prediction
          # for a single-string list. Wrap these in a list.
          if isinstance(batch_preds, str):
              batch_preds = [batch_preds]
  
          # Get PyTorch tensors off of other devices.
          if isinstance(batch_preds, torch.Tensor):
              batch_preds = batch_preds.cpu()
  
          if isinstance(batch_preds, list):
              outputs.extend(batch_preds)
          elif isinstance(batch_preds, np.ndarray):
              # outputs.append(batch_preds)
              outputs.append(torch.tensor(batch_preds))
          else:
              outputs.append(batch_preds)
          i += self.batch_size
  
      if isinstance(outputs[0], torch.Tensor):
          outputs = torch.cat(outputs, dim=0)
      elif isinstance(outputs[0], np.ndarray):
          outputs = np.concatenate(outputs).ravel()
  
      assert len(inputs) == len(
          outputs
      ), f"Got {len(outputs)} outputs for {len(inputs)} inputs"
  
      return self._process_model_outputs(attacked_text_list, outputs)
  
imports: from abc import ABC, abstractmethod
  import lru
  import numpy
  import torch
  from textattack.goal_function_results.goal_function_result import GoalFunctionResultStatus
  from textattack.shared import validators
  from textattack.shared.utils import ReprMixin
label_desc: Use image node_id 14 for calling the GoalFunction obj's underlying member method code with example usage: obj._call_model_uncached(attacked_text_list) and returns: self, list