docstr:         :param data: Model input data. Either a pandas DataFrame with only 1 row or a dictionary.
  
                       .. code-block:: python
                          loaded_model = mlflow.pyfunc.load_model(logged_model.model_uri)
                          # Predict on a flow input dictionary.
                          print(loaded_model.predict({"text": "Python Hello World!"}))
  
          :param params: Additional parameters to pass to the model for inference.
  
                         .. Note:: Experimental: This parameter may change or be removed in a future
                                                 release without warning.
  
          :return: Model predictions. Dict type, example ``{"output": "
  
  print('Hello World!')"}``
          
docstr_tok: [":","param","data",":","Model","input","data",".","Either","a","pandas","DataFrame","with","only","1","row","or","a","dictionary",".","..","code-block",":",":","python","loaded_model","=","mlflow.pyfunc.load_model","(","logged_model.model_uri",")","#","Predict","on","a","flow","input","dictionary",".","print","(","loaded_model.predict","(","{","``","text","''",":","``","Python","Hello","World","!","''","}",")",")",":","param","params",":","Additional","parameters","to","pass","to","the","model","for","inference",".","..","Note",":",":","Experimental",":","This","parameter","may","change","or","be","removed","in","a","future","release","without","warning",".",":","return",":","Model","predictions",".","Dict","type",",","example","``","{","``","output","''",":","``","print","(","'Hello","World","!","'",")","''","}","``"]
code: def predict(  # pylint: disable=unused-argument
      self,
      data: Union[pd.DataFrame, List[Union[str, Dict[str, Any]]]],
      params: Optional[
          Dict[str, Any]
      ] = None,  # pylint: disable=unused-argument
  ) -> dict:
      """
      :param data: Model input data. Either a pandas DataFrame with only 1 row or a dictionary.
  
                   .. code-block:: python
                      loaded_model = mlflow.pyfunc.load_model(logged_model.model_uri)
                      # Predict on a flow input dictionary.
                      print(loaded_model.predict({"text": "Python Hello World!"}))
  
      :param params: Additional parameters to pass to the model for inference.
  
                     .. Note:: Experimental: This parameter may change or be removed in a future
                                             release without warning.
  
      :return: Model predictions. Dict type, example ``{"output": "\n\nprint('Hello World!')"}``
      """
      if isinstance(data, pd.DataFrame):
          messages = data.to_dict(orient="records")
          if len(messages) > 1:
              raise mlflow.MlflowException.invalid_parameter_value(
                  _INVALID_PREDICT_INPUT_ERROR_MESSAGE
              )
          messages = messages[0]
      elif isinstance(data, dict):
          messages = data
      else:
          raise mlflow.MlflowException.invalid_parameter_value(
              _INVALID_PREDICT_INPUT_ERROR_MESSAGE
          )
      return self.model_invoker.invoke(messages)
  
imports: import logging
  import os
  import shutil
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Union
  import pandas
  import yaml
  import mlflow
  from mlflow import pyfunc
  from mlflow.models import Model, ModelSignature
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.signature import _infer_signature_from_input_example
  from mlflow.models.utils import ModelInputExample, _save_example
  from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.annotations import experimental
  from mlflow.utils.docstring_utils import LOG_MODEL_PARAM_DOCS, format_docstring
  from mlflow.utils.environment import _CONDA_ENV_FILE_NAME, _CONSTRAINTS_FILE_NAME, _PYTHON_ENV_FILE_NAME, _REQUIREMENTS_FILE_NAME, _mlflow_conda_env, _process_conda_env, _process_pip_requirements, _PythonEnv, _validate_env_arguments
  from mlflow.utils.file_utils import write_to
  from mlflow.utils.model_utils import _validate_and_copy_code_paths, _validate_and_prepare_target_save_path
  from mlflow.utils.requirements_utils import _get_pinned_requirement
label_desc: Use image node_id 2 for calling the _PromptflowModelWrapper obj's underlying member method code with example usage: obj.predict(data, params) and returns: self