class_docstr: a `Predictor` is a thin wrapper around an AllenNLP model that handles JSON -> JSON predictions
  that can be used for serving models through the web API or making predictions in bulk.
docstr: Instantiate a `Predictor` from an archive path.
  
  If you need more detailed configuration options, such as overrides,
  please use `from_archive`.
  
  # Parameters
  
  archive_path : `Union[str, PathLike]`
      The path to the archive.
  predictor_name : `str`, optional (default=`None`)
      Name that the predictor is registered as, or None to use the
      predictor associated with the model.
  cuda_device : `int`, optional (default=`-1`)
      If `cuda_device` is >= 0, the model will be loaded onto the
      corresponding GPU. Otherwise it will be loaded onto the CPU.
  dataset_reader_to_load : `str`, optional (default=`"validation"`)
      Which dataset reader to load from the archive, either "train" or
      "validation".
  frozen : `bool`, optional (default=`True`)
      If we should call `model.eval()` when building the predictor.
  import_plugins : `bool`, optional (default=`True`)
      If `True`, we attempt to import plugins before loading the predictor.
      This comes with additional overhead, but means you don't need to explicitly
      import the modules that your predictor depends on as long as those modules
      can be found by `allennlp.common.plugins.import_plugins()`.
  overrides : `Union[str, Dict[str, Any]]`, optional (default = `""`)
      JSON overrides to apply to the unarchived `Params` object.
  **kwargs : `Any`
      Additional key-word arguments that will be passed to the `Predictor`'s
      `__init__()` method.
  
  # Returns
  
  `Predictor`
      A Predictor instance.
docstr_tok: ["Instantiate","a","`","Predictor","`","from","an","archive","path",".","If","you","need","more","detailed","configuration","options",",","such","as","overrides",",","please","use","`","from_archive","`",".","#","Parameters","archive_path",":","`","Union","[","str",",","PathLike","]","`","The","path","to","the","archive",".","predictor_name",":","`","str","`",",","optional","(","default=","`","None","`",")","Name","that","the","predictor","is","registered","as",",","or","None","to","use","the","predictor","associated","with","the","model",".","cuda_device",":","`","int","`",",","optional","(","default=","`","-1","`",")","If","`","cuda_device","`","is",">","=","0",",","the","model","will","be","loaded","onto","the","corresponding","GPU",".","Otherwise","it","will","be","loaded","onto","the","CPU",".","dataset_reader_to_load",":","`","str","`",",","optional","(","default=","`","``","validation","''","`",")","Which","dataset","reader","to","load","from","the","archive",",","either","``","train","''","or","``","validation","''",".","frozen",":","`","bool","`",",","optional","(","default=","`","True","`",")","If","we","should","call","`","model.eval","(",")","`","when","building","the","predictor",".","import_plugins",":","`","bool","`",",","optional","(","default=","`","True","`",")","If","`","True","`",",","we","attempt","to","import","plugins","before","loading","the","predictor",".","This","comes","with","additional","overhead",",","but","means","you","do","n't","need","to","explicitly","import","the","modules","that","your","predictor","depends","on","as","long","as","those","modules","can","be","found","by","`","allennlp.common.plugins.import_plugins","(",")","`",".","overrides",":","`","Union","[","str",",","Dict","[","str",",","Any","]","]","`",",","optional","(","default","=","`","``","''","`",")","JSON","overrides","to","apply","to","the","unarchived","`","Params","`","object",".","*","*","kwargs",":","`","Any","`","Additional","key-word","arguments","that","will","be","passed","to","the","`","Predictor","`","'s","`","__init__","(",")","`","method",".","#","Returns","`","Predictor","`","A","Predictor","instance","."]
code: def from_path(
      cls,
      archive_path: Union[str, PathLike],
      predictor_name: str = None,
      cuda_device: int = -1,
      dataset_reader_to_load: str = "validation",
      frozen: bool = True,
      import_plugins: bool = True,
      overrides: Union[str, Dict[str, Any]] = "",
      **kwargs,
  ) -> "Predictor":
      """
      Instantiate a `Predictor` from an archive path.
  
      If you need more detailed configuration options, such as overrides,
      please use `from_archive`.
  
      # Parameters
  
      archive_path : `Union[str, PathLike]`
          The path to the archive.
      predictor_name : `str`, optional (default=`None`)
          Name that the predictor is registered as, or None to use the
          predictor associated with the model.
      cuda_device : `int`, optional (default=`-1`)
          If `cuda_device` is >= 0, the model will be loaded onto the
          corresponding GPU. Otherwise it will be loaded onto the CPU.
      dataset_reader_to_load : `str`, optional (default=`"validation"`)
          Which dataset reader to load from the archive, either "train" or
          "validation".
      frozen : `bool`, optional (default=`True`)
          If we should call `model.eval()` when building the predictor.
      import_plugins : `bool`, optional (default=`True`)
          If `True`, we attempt to import plugins before loading the predictor.
          This comes with additional overhead, but means you don't need to explicitly
          import the modules that your predictor depends on as long as those modules
          can be found by `allennlp.common.plugins.import_plugins()`.
      overrides : `Union[str, Dict[str, Any]]`, optional (default = `""`)
          JSON overrides to apply to the unarchived `Params` object.
      **kwargs : `Any`
          Additional key-word arguments that will be passed to the `Predictor`'s
          `__init__()` method.
  
      # Returns
  
      `Predictor`
          A Predictor instance.
      """
      if import_plugins:
          plugins.import_plugins()
      return Predictor.from_archive(
          load_archive(
              archive_path, cuda_device=cuda_device, overrides=overrides
          ),
          predictor_name,
          dataset_reader_to_load=dataset_reader_to_load,
          frozen=frozen,
          extra_args=kwargs,
      )
  
imports: from typing import List, Iterator, Dict, Tuple, Any, Type, Union, Optional
  import logging
  from os import PathLike
  import json
  import re
  from contextlib import contextmanager
  import numpy
  import torch
  from torch.utils.hooks import RemovableHandle
  from torch import Tensor
  from torch import backends
  from allennlp.common import Registrable, plugins
  from allennlp.common.util import JsonDict, sanitize
  from allennlp.data import DatasetReader, Instance
  from allennlp.data.batch import Batch
  from allennlp.models import Model
  from allennlp.models.archival import Archive, load_archive
  from allennlp.nn import util
label_desc: Use image node_id 17 for calling the Predictor obj's underlying member method code with example usage: obj.from_path(cls, archive_path, predictor_name, cuda_device, dataset_reader_to_load, frozen, import_plugins, overrides) and returns: Predictor