class_docstr: Resolver for HuggingFace's pipeline request and responses, providing necessary data transformations and formatting.
  
  This is based off (from wandb.sdk.integration_utils.auto_logging import RequestResponseResolver)
class_docstr_tok: ["Resolver","for","HuggingFace","'s","pipeline","request","and","responses",",","providing","necessary","data","transformations","and","formatting",".","This","is","based","off","(","from","wandb.sdk.integration_utils.auto_logging","import","RequestResponseResolver",")"]
docstr: Main call method for this class.
  
  :param args: list of arguments
  :param kwargs: dictionary of keyword arguments
  :param response: the response from the request
  :param start_time: time when request started
  :param time_elapsed: time elapsed for the request
  :returns: packed data as a dictionary for logging to wandb, None if an exception occurred
docstr_tok: ["Main","call","method","for","this","class",".",":","param","args",":","list","of","arguments",":","param","kwargs",":","dictionary","of","keyword","arguments",":","param","response",":","the","response","from","the","request",":","param","start_time",":","time","when","request","started",":","param","time_elapsed",":","time","elapsed","for","the","request",":","returns",":","packed","data","as","a","dictionary","for","logging","to","wandb",",","None","if","an","exception","occurred"]
code: def __call__(
      self,
      args: Sequence[Any],
      kwargs: Dict[str, Any],
      response: Response,
      start_time: float,
      time_elapsed: float,
  ) -> Optional[Dict[str, Any]]:
      """Main call method for this class.
  
      :param args: list of arguments
      :param kwargs: dictionary of keyword arguments
      :param response: the response from the request
      :param start_time: time when request started
      :param time_elapsed: time elapsed for the request
      :returns: packed data as a dictionary for logging to wandb, None if an exception occurred
      """
      try:
          pipe, input_data = args[:2]
          task = pipe.task
  
          # Translation tasks are in the form of `translation_x_to_y`
          if task in SUPPORTED_PIPELINE_TASKS or task.startswith(
              "translation"
          ):
              model = self._get_model(pipe)
              if model is None:
                  return None
              model_alias = model.name_or_path
              timestamp = datetime.now(pytz.utc)
  
              input_data, response = self._transform_task_specific_data(
                  task, input_data, response
              )
              formatted_data = self._format_data(
                  task, input_data, response, kwargs
              )
              packed_data = self._create_table(
                  formatted_data, model_alias, timestamp, time_elapsed
              )
              table_name = os.environ.get(
                  "WANDB_AUTOLOG_TABLE_NAME", f"{task}"
              )
              # TODO: Let users decide the name in a way that does not use an environment variable
  
              return {
                  table_name: wandb.Table(
                      columns=packed_data[0], data=packed_data[1:]
                  )
              }
  
          logger.warning(
              f"The task: `{task}` is not yet supported.\nPlease contact `wandb` to notify us if you would like support for this task"
          )
      except Exception as e:
          logger.warning(e)
      return None
  
file_path: wandb/wandb/integration/huggingface/resolver.py
imports: import logging
  import os
  from datetime import datetime
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import pytz
  import wandb
  from wandb.sdk.integration_utils.auto_logging import Response
  from wandb.sdk.lib.runid import generate_id
label_desc: Use image node_id 1 for calling the HuggingFacePipelineRequestResponseResolver obj's underlying member method code with example usage: obj.__call__(args, kwargs, response, start_time, time_elapsed) and returns: None, dict, None