docstr: Predict values for the label column of new data.
  
  Parameters
  ----------
  data
      The data to make predictions for. Should contain same column names as training data and
      follow same format (except for the `label` column).
  as_pandas
      Whether to return the output as a pandas DataFrame(Series) (True) or numpy array (False).
  realtime
      Whether to do realtime inference, which is efficient for small data (default False).
      If provided None, we would infer it on based on the data modalities
      and sample number.
  
  Returns
  -------
  Array of predictions, one corresponding to each row in given dataset.
docstr_tok: ["Predict","values","for","the","label","column","of","new","data",".","Parameters","--","--","--","--","--","data","The","data","to","make","predictions","for",".","Should","contain","same","column","names","as","training","data","and","follow","same","format","(","except","for","the","`","label","`","column",")",".","as_pandas","Whether","to","return","the","output","as","a","pandas","DataFrame","(","Series",")","(","True",")","or","numpy","array","(","False",")",".","realtime","Whether","to","do","realtime","inference",",","which","is","efficient","for","small","data","(","default","False",")",".","If","provided","None",",","we","would","infer","it","on","based","on","the","data","modalities","and","sample","number",".","Returns","--","--","--","-","Array","of","predictions",",","one","corresponding","to","each","row","in","given","dataset","."]
code: def predict(
      self,
      data: Union[pd.DataFrame, dict, list, str],
      as_pandas: Optional[bool] = None,
      realtime: Optional[bool] = False,
      **kwargs,
  ):
      """
      Predict values for the label column of new data.
  
      Parameters
      ----------
      data
          The data to make predictions for. Should contain same column names as training data and
          follow same format (except for the `label` column).
      as_pandas
          Whether to return the output as a pandas DataFrame(Series) (True) or numpy array (False).
      realtime
          Whether to do realtime inference, which is efficient for small data (default False).
          If provided None, we would infer it on based on the data modalities
          and sample number.
  
      Returns
      -------
      Array of predictions, one corresponding to each row in given dataset.
      """
      self.ensure_predict_ready()
      outputs = self.predict_per_run(
          data=data,
          realtime=realtime,
          requires_label=False,
      )
      logits = extract_from_output(outputs=outputs, ret_type=NER_RET)
      if self._df_preprocessor:
          pred = self._df_preprocessor.transform_prediction(
              y_pred=logits,
          )
      else:
          pred = logits
  
      pred = merge_bio_format(
          data[self._df_preprocessor.ner_feature_names[0]], pred
      )
      if (
          as_pandas is None and isinstance(data, pd.DataFrame)
      ) or as_pandas is True:
          pred = self._as_pandas(data=data, to_be_converted=pred)
  
      return pred
  
imports: import json
  import logging
  import os
  import warnings
  from datetime import timedelta
  from typing import Callable, Dict, List, Optional, Union
  import lightning.pytorch
  import pandas
  from omegaconf import DictConfig, OmegaConf
  from torch import nn
  from autogluon.core.metrics import Scorer
  from ..constants import NER, NER_RET, Y_PRED, Y_TRUE
  from ..data import MultiModalFeaturePreprocessor
  from ..optimization import NerLitModule, get_metric
  from ..utils import compute_score, create_fusion_model, extract_from_output, merge_bio_format
  from .base import BaseLearner
label_desc: Use image node_id 13 for calling the NERLearner obj's underlying member method code with example usage: obj.predict(data, as_pandas, realtime) and returns: pred