class_docstr: The feature-store class used to store feature data for GNNs
class_docstr_tok: ["The","feature-store","class","used","to","store","feature","data","for","GNNs"]
docstr: Constructs a new FeatureStore object
  
  Parameters:
  ----------
  backend: str ('numpy', 'torch', 'wholegraph')
      Optional (default='numpy')
      The name of the backend to use.
  
  wg_comm: WholeMemoryCommunicator
      Optional (default=automatic)
      Only used with the 'wholegraph' backend.
      The communicator to use to store features in WholeGraph.
  
  wg_type: str ('distributed', 'continuous', 'chunked')
      Optional (default='distributed')
      Only used with the 'wholegraph' backend.
      The memory format (distributed, continuous, or chunked) of
      this FeatureStore.  For more information see the WholeGraph
      documentation.
  
  wg_location: str ('cpu', 'cuda')
      Optional (default='cuda')
      Only used with the 'wholegraph' backend.
      Where the data is stored (cpu or cuda).
      Defaults to storing on the GPU (cuda).
docstr_tok: ["Constructs","a","new","FeatureStore","object","Parameters",":","--","--","--","--","--","backend",":","str","(","'numpy","'",",","'torch","'",",","'wholegraph","'",")","Optional","(","default='numpy","'",")","The","name","of","the","backend","to","use",".","wg_comm",":","WholeMemoryCommunicator","Optional","(","default=automatic",")","Only","used","with","the","'wholegraph","'","backend",".","The","communicator","to","use","to","store","features","in","WholeGraph",".","wg_type",":","str","(","'distributed","'",",","'continuous","'",",","'chunked","'",")","Optional","(","default='distributed","'",")","Only","used","with","the","'wholegraph","'","backend",".","The","memory","format","(","distributed",",","continuous",",","or","chunked",")","of","this","FeatureStore",".","For","more","information","see","the","WholeGraph","documentation",".","wg_location",":","str","(","'cpu","'",",","'cuda","'",")","Optional","(","default='cuda","'",")","Only","used","with","the","'wholegraph","'","backend",".","Where","the","data","is","stored","(","cpu","or","cuda",")",".","Defaults","to","storing","on","the","GPU","(","cuda",")","."]
code: def __init__(
      self,
      backend: str = "numpy",
      wg_comm: object = None,
      wg_type: str = None,
      wg_location: str = None,
  ):
      """
      Constructs a new FeatureStore object
  
      Parameters:
      ----------
      backend: str ('numpy', 'torch', 'wholegraph')
          Optional (default='numpy')
          The name of the backend to use.
  
      wg_comm: WholeMemoryCommunicator
          Optional (default=automatic)
          Only used with the 'wholegraph' backend.
          The communicator to use to store features in WholeGraph.
  
      wg_type: str ('distributed', 'continuous', 'chunked')
          Optional (default='distributed')
          Only used with the 'wholegraph' backend.
          The memory format (distributed, continuous, or chunked) of
          this FeatureStore.  For more information see the WholeGraph
          documentation.
  
      wg_location: str ('cpu', 'cuda')
          Optional (default='cuda')
          Only used with the 'wholegraph' backend.
          Where the data is stored (cpu or cuda).
          Defaults to storing on the GPU (cuda).
      """
  
      self.fd = defaultdict(dict)
      if backend not in ["numpy", "torch", "wholegraph"]:
          raise ValueError(
              f"backend {backend} not supported. "
              "Supported backends are numpy, torch, wholegraph"
          )
      self.backend = backend
  
      self.__wg_comm = None
      self.__wg_type = None
      self.__wg_location = None
  
      if backend == "wholegraph":
          self.__wg_comm = (
              wg_comm
              if wg_comm is not None
              else wgth.get_local_node_communicator()
          )
          self.__wg_type = (
              wg_type if wg_type is not None else "distributed"
          )
          self.__wg_location = (
              wg_location if wg_location is not None else "cuda"
          )
  
          if self.__wg_type not in [
              "distributed",
              "chunked",
              "continuous",
          ]:
              raise ValueError(
                  f"invalid memory format {self.__wg_type}"
              )
          if (self.__wg_location != "cuda") and (
              self.__wg_location != "cpu"
          ):
              raise ValueError(f"invalid location {self.__wg_location}")
  
file_path: cugraph/python/cugraph/cugraph/gnn/feature_storage/feat_storage.py
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import Sequence, Union
  import cudf
  import cupy
  import numpy
  import pandas
  from cugraph.utilities.utils import import_optional, MissingModule
label_desc: Use image node_id 1 to create a new FeatureStore object  with example: obj = FeatureStore(backend, wg_comm, wg_type, wg_location)