class_docstr: This is a mixin used to provide saving/loading functionality for all processor classes.
class_docstr_tok: ["This","is","a","mixin","used","to","provide","saving\/loading","functionality","for","all","processor","classes","."]
docstr: Instantiate a processor associated with a pretrained model.
  
  <Tip>
  
  This class method is simply calling the feature extractor
  [`~feature_extraction_utils.FeatureExtractionMixin.from_pretrained`] and the tokenizer
  [`~tokenization_utils_base.PreTrainedTokenizer.from_pretrained`] methods. Please refer to the docstrings of the
  methods above for more information.
  
  </Tip>
  
  Args:
      pretrained_model_name_or_path (`str` or `os.PathLike`):
          This can be either:
  
          - a string, the *model id* of a pretrained feature_extractor hosted inside a model repo on
            huggingface.co. Valid model ids can be located at the root-level, like `bert-base-uncased`, or
            namespaced under a user or organization name, like `dbmdz/bert-base-german-cased`.
          - a path to a *directory* containing a feature extractor file saved using the
            [`~SequenceFeatureExtractor.save_pretrained`] method, e.g., `./my_model_directory/`.
          - a path or url to a saved feature extractor JSON *file*, e.g.,
            `./my_model_directory/preprocessor_config.json`.
      **kwargs
          Additional keyword arguments passed along to both
          [`~feature_extraction_utils.FeatureExtractionMixin.from_pretrained`] and
          [`~tokenization_utils_base.PreTrainedTokenizer.from_pretrained`].
docstr_tok: ["Instantiate","a","processor","associated","with","a","pretrained","model",".","<","Tip",">","This","class","method","is","simply","calling","the","feature","extractor","[","`","~feature_extraction_utils.FeatureExtractionMixin.from_pretrained","`","]","and","the","tokenizer","[","`","~tokenization_utils_base.PreTrainedTokenizer.from_pretrained","`","]","methods",".","Please","refer","to","the","docstrings","of","the","methods","above","for","more","information",".","<","\/Tip",">","Args",":","pretrained_model_name_or_path","(","`","str","`","or","`","os.PathLike","`",")",":","This","can","be","either",":","-","a","string",",","the","*","model","id","*","of","a","pretrained","feature_extractor","hosted","inside","a","model","repo","on","huggingface.co",".","Valid","model","ids","can","be","located","at","the","root-level",",","like","`","bert-base-uncased","`",",","or","namespaced","under","a","user","or","organization","name",",","like","`","dbmdz\/bert-base-german-cased","`",".","-","a","path","to","a","*","directory","*","containing","a","feature","extractor","file","saved","using","the","[","`","~SequenceFeatureExtractor.save_pretrained","`","]","method",",","e.g.",",","`",".\/my_model_directory\/","`",".","-","a","path","or","url","to","a","saved","feature","extractor","JSON","*","file","*",",","e.g.",",","`",".\/my_model_directory\/preprocessor_config.json","`",".","*","*","kwargs","Additional","keyword","arguments","passed","along","to","both","[","`","~feature_extraction_utils.FeatureExtractionMixin.from_pretrained","`","]","and","[","`","~tokenization_utils_base.PreTrainedTokenizer.from_pretrained","`","]","."]
code: def from_pretrained(cls, pretrained_model_name_or_path, **kwargs):
      r"""
      Instantiate a processor associated with a pretrained model.
  
      <Tip>
  
      This class method is simply calling the feature extractor
      [`~feature_extraction_utils.FeatureExtractionMixin.from_pretrained`] and the tokenizer
      [`~tokenization_utils_base.PreTrainedTokenizer.from_pretrained`] methods. Please refer to the docstrings of the
      methods above for more information.
  
      </Tip>
  
      Args:
          pretrained_model_name_or_path (`str` or `os.PathLike`):
              This can be either:
  
              - a string, the *model id* of a pretrained feature_extractor hosted inside a model repo on
                huggingface.co. Valid model ids can be located at the root-level, like `bert-base-uncased`, or
                namespaced under a user or organization name, like `dbmdz/bert-base-german-cased`.
              - a path to a *directory* containing a feature extractor file saved using the
                [`~SequenceFeatureExtractor.save_pretrained`] method, e.g., `./my_model_directory/`.
              - a path or url to a saved feature extractor JSON *file*, e.g.,
                `./my_model_directory/preprocessor_config.json`.
          **kwargs
              Additional keyword arguments passed along to both
              [`~feature_extraction_utils.FeatureExtractionMixin.from_pretrained`] and
              [`~tokenization_utils_base.PreTrainedTokenizer.from_pretrained`].
      """
      args = cls._get_arguments_from_pretrained(
          pretrained_model_name_or_path, **kwargs
      )
      return cls(*args)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/processing_utils.py
imports: import importlib.util
  import os
  from pathlib import Path
  from .dynamic_module_utils import custom_object_save
  from .tokenization_utils_base import PreTrainedTokenizerBase
  from .utils import PushToHubMixin, copy_func, logging
label_desc: Use image node_id 4 for calling the ProcessorMixin obj's underlying member method code with example usage: obj.from_pretrained(cls, pretrained_model_name_or_path) and returns: cls