class_docstr: Read-Only Artifact object
class_docstr_tok: ["Read-Only","Artifact","object"]
docstr: Return an object constructed from the artifact file
  
  Currently supported types: Numpy.array, pandas.DataFrame, PIL.Image, dict.
  Supported content types are:
      - dict - ``.json``, ``.yaml``
      - pandas.DataFrame - ``.csv.gz``, ``.parquet``, ``.feather``, ``.pickle``
      - numpy.ndarray - ``.npz``, ``.csv.gz``
      - PIL.Image - whatever content types PIL supports
  All other types will return a pathlib2.Path object pointing to a local copy of the artifacts file (or directory).
  In case the content of a supported type could not be parsed, a pathlib2.Path object
  pointing to a local copy of the artifacts file (or directory) will be returned
  
  :param bool force_download: download file from remote even if exists in local cache
  :param Callable[bytes, Any] deserialization_function: A deserialization function that takes one parameter of type `bytes`,
      which represents the serialized object. This function should return the deserialized object.
      Useful when the artifact was uploaded using a custom serialization function when calling the
      `Task.upload_artifact` method with the `serialization_function` argument.
  :return: Usually, one of the following objects: Numpy.array, pandas.DataFrame, PIL.Image, dict (json), or pathlib2.Path.
      An object with an arbitrary type may also be returned if it was serialized (using pickle or a custom serialization function).
docstr_tok: ["Return","an","object","constructed","from","the","artifact","file","Currently","supported","types",":","Numpy.array",",","pandas.DataFrame",",","PIL.Image",",","dict",".","Supported","content","types","are",":","-","dict","-","``",".json","``",",","``",".yaml","``","-","pandas.DataFrame","-","``",".csv.gz","``",",","``",".parquet","``",",","``",".feather","``",",","``",".pickle","``","-","numpy.ndarray","-","``",".npz","``",",","``",".csv.gz","``","-","PIL.Image","-","whatever","content","types","PIL","supports","All","other","types","will","return","a","pathlib2.Path","object","pointing","to","a","local","copy","of","the","artifacts","file","(","or","directory",")",".","In","case","the","content","of","a","supported","type","could","not","be","parsed",",","a","pathlib2.Path","object","pointing","to","a","local","copy","of","the","artifacts","file","(","or","directory",")","will","be","returned",":","param","bool","force_download",":","download","file","from","remote","even","if","exists","in","local","cache",":","param","Callable","[","bytes",",","Any","]","deserialization_function",":","A","deserialization","function","that","takes","one","parameter","of","type","`","bytes","`",",","which","represents","the","serialized","object",".","This","function","should","return","the","deserialized","object",".","Useful","when","the","artifact","was","uploaded","using","a","custom","serialization","function","when","calling","the","`","Task.upload_artifact","`","method","with","the","`","serialization_function","`","argument",".",":","return",":","Usually",",","one","of","the","following","objects",":","Numpy.array",",","pandas.DataFrame",",","PIL.Image",",","dict","(","json",")",",","or","pathlib2.Path",".","An","object","with","an","arbitrary","type","may","also","be","returned","if","it","was","serialized","(","using","pickle","or","a","custom","serialization","function",")","."]
code: def get(self, force_download=False, deserialization_function=None):
      # type: (bool, Optional[Callable[[bytes], Any]]) -> Any
      """
      Return an object constructed from the artifact file
  
      Currently supported types: Numpy.array, pandas.DataFrame, PIL.Image, dict.
      Supported content types are:
          - dict - ``.json``, ``.yaml``
          - pandas.DataFrame - ``.csv.gz``, ``.parquet``, ``.feather``, ``.pickle``
          - numpy.ndarray - ``.npz``, ``.csv.gz``
          - PIL.Image - whatever content types PIL supports
      All other types will return a pathlib2.Path object pointing to a local copy of the artifacts file (or directory).
      In case the content of a supported type could not be parsed, a pathlib2.Path object
      pointing to a local copy of the artifacts file (or directory) will be returned
  
      :param bool force_download: download file from remote even if exists in local cache
      :param Callable[bytes, Any] deserialization_function: A deserialization function that takes one parameter of type `bytes`,
          which represents the serialized object. This function should return the deserialized object.
          Useful when the artifact was uploaded using a custom serialization function when calling the
          `Task.upload_artifact` method with the `serialization_function` argument.
      :return: Usually, one of the following objects: Numpy.array, pandas.DataFrame, PIL.Image, dict (json), or pathlib2.Path.
          An object with an arbitrary type may also be returned if it was serialized (using pickle or a custom serialization function).
      """
      if self._object is not self._not_set:
          return self._object
  
      local_file = self.get_local_copy(
          raise_on_error=True, force_download=force_download
      )
  
      # noinspection PyBroadException
      try:
          if deserialization_function:
              with open(local_file, "rb") as f:
                  self._object = deserialization_function(f.read())
          elif self.type == "numpy" and np:
              if self._content_type == "text/csv":
                  self._object = np.genfromtxt(
                      local_file, delimiter=","
                  )
              else:
                  self._object = np.load(local_file)[self.name]
          elif (
              self.type == Artifacts._pd_artifact_type
              or self.type == "pandas"
              and pd
          ):
              if self._content_type == "application/parquet":
                  self._object = pd.read_parquet(local_file)
              elif self._content_type == "application/feather":
                  self._object = pd.read_feather(local_file)
              elif self._content_type == "application/pickle":
                  self._object = pd.read_pickle(local_file)
              elif self.type == Artifacts._pd_artifact_type:
                  self._object = pd.read_csv(local_file)
              else:
                  self._object = pd.read_csv(local_file, index_col=[0])
          elif self.type == "image":
              self._object = Image.open(local_file)
          elif self.type == "JSON" or self.type == "dict":
              with open(local_file, "rt") as f:
                  if (
                      self.type == "JSON"
                      or self._content_type == "application/json"
                  ):
                      self._object = json.load(f)
                  else:
                      self._object = yaml.safe_load(f)
          elif self.type == "string":
              with open(local_file, "rt") as f:
                  self._object = f.read()
          elif self.type == "pickle":
              with open(local_file, "rb") as f:
                  self._object = pickle.load(f)
      except Exception as e:
          LoggerRoot.get_base_logger().warning(
              "Exception '{}' encountered when getting artifact with type {} and content type {}".format(
                  e, self.type, self._content_type
              )
          )
  
      if self._object is self._not_set:
          local_file = Path(local_file)
          self._object = local_file
  
      return self._object
  
imports: import gzip
  import io
  import json
  import yaml
  import mimetypes
  import os
  import pickle
  from six.moves.urllib.parse import quote
  from copy import deepcopy
  from datetime import datetime
  from multiprocessing.pool import ThreadPool
  from tempfile import mkdtemp, mkstemp
  from threading import Thread
  from time import time
  from zipfile import ZipFile, ZIP_DEFLATED
  import six
  from PIL import Image
  from pathlib2 import Path
  from six.moves.urllib.parse import urlparse
  from typing import Dict, Union, Optional, Any, Sequence, Callable
  from ..backend_api import Session
  from ..backend_api.services import tasks
  from ..backend_interface.metrics.events import UploadEvent
  from ..debugging.log import LoggerRoot
  from ..storage.helper import remote_driver_schemes
  from ..storage.util import sha256sum, format_size, get_common_path
  from ..utilities.process.mp import SafeEvent, ForkSafeRLock
  from ..utilities.proxy_object import LazyEvalWrapper
label_desc: Use image node_id 11 for calling the Artifact obj's underlying member method code with example usage: obj.get(force_download, deserialization_function) and returns: self, self