class_docstr: An implementation of :py:class:`torch.distributed.checkpoint.checkpointer.Checkpointer`
  for the file system. Wraps the creation and usage of ``FileSystemWriter`` and ``FileSystemReader``.
  
  .. warning::
      This feature is experimental and subject to removal/change.
class_docstr_tok: ["An","implementation","of",":","py",":","class",":","`","torch.distributed.checkpoint.checkpointer.Checkpointer","`","for","the","file","system",".","Wraps","the","creation","and","usage","of","``","FileSystemWriter","``","and","``","FileSystemReader","``",".","..","warning",":",":","This","feature","is","experimental","and","subject","to","removal\/change","."]
docstr: Initializes Checkpointing defualts, including ``FileSystemWriter`` and ``FileSystemReader``
  
  Args:
      path: The directory to store/load checkpoints.
      single_file_per_rank: Produce one file per rank instead of one file per tensor/blob. Default to True.
      sync_files: force files to be synced to permanent storage. Default to True.
      thread_count: Number of IO threads to use to write. Default to 1.
      per_thread_copy_ahead: How many bytes to copy from the GPU ahead of saving then. Default 10Mb.
      process_group: ProcessGroup to be used for cross-rank synchronization.
      coordinator_rank: Rank to use to coordinate the checkpoint. rank0 is used by default.
      no_dist: If ``True``, distributed checkpoint will not load in SPMD style. (Default: ``False``)
      loader_planner: Instance of LoadPlanner to use when loading.
      save_planner: Instance of SavePlanner to use when saving.
docstr_tok: ["Initializes","Checkpointing","defualts",",","including","``","FileSystemWriter","``","and","``","FileSystemReader","``","Args",":","path",":","The","directory","to","store\/load","checkpoints",".","single_file_per_rank",":","Produce","one","file","per","rank","instead","of","one","file","per","tensor\/blob",".","Default","to","True",".","sync_files",":","force","files","to","be","synced","to","permanent","storage",".","Default","to","True",".","thread_count",":","Number","of","IO","threads","to","use","to","write",".","Default","to","1.","per_thread_copy_ahead",":","How","many","bytes","to","copy","from","the","GPU","ahead","of","saving","then",".","Default","10Mb",".","process_group",":","ProcessGroup","to","be","used","for","cross-rank","synchronization",".","coordinator_rank",":","Rank","to","use","to","coordinate","the","checkpoint",".","rank0","is","used","by","default",".","no_dist",":","If","``","True","``",",","distributed","checkpoint","will","not","load","in","SPMD","style",".","(","Default",":","``","False","``",")","loader_planner",":","Instance","of","LoadPlanner","to","use","when","loading",".","save_planner",":","Instance","of","SavePlanner","to","use","when","saving","."]
code: def __init__(
      self,
      path: Union[str, os.PathLike],
      *,
      single_file_per_rank: bool = True,
      sync_files: bool = True,
      thread_count: int = 1,
      per_thread_copy_ahead: int = 10_000_000,
      process_group: Optional[dist.ProcessGroup] = None,
      coordinator_rank: int = 0,
      no_dist: bool = False,
      load_planner: Optional[LoadPlanner] = None,
      save_planner: Optional[SavePlanner] = None,
  ) -> None:
      """Initializes Checkpointing defualts, including ``FileSystemWriter`` and ``FileSystemReader``
  
      Args:
          path: The directory to store/load checkpoints.
          single_file_per_rank: Produce one file per rank instead of one file per tensor/blob. Default to True.
          sync_files: force files to be synced to permanent storage. Default to True.
          thread_count: Number of IO threads to use to write. Default to 1.
          per_thread_copy_ahead: How many bytes to copy from the GPU ahead of saving then. Default 10Mb.
          process_group: ProcessGroup to be used for cross-rank synchronization.
          coordinator_rank: Rank to use to coordinate the checkpoint. rank0 is used by default.
          no_dist: If ``True``, distributed checkpoint will not load in SPMD style. (Default: ``False``)
          loader_planner: Instance of LoadPlanner to use when loading.
          save_planner: Instance of SavePlanner to use when saving.
      """
  
      storage_writer = FileSystemWriter(
          path,
          single_file_per_rank,
          sync_files,
          thread_count,
          per_thread_copy_ahead,
      )
      storage_reader = FileSystemReader(path)
  
      super().__init__(
          storage_writer,
          storage_reader,
          process_group=process_group,
          coordinator_rank=coordinator_rank,
          no_dist=no_dist,
          load_planner=load_planner,
          save_planner=save_planner,
      )
  
imports: import collections
  import dataclasses
  import io
  import os
  import pickle
  import queue
  import threading
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from pathlib import Path
  from typing import Callable, cast, Dict, IO, Iterable, Iterator, List, Optional, Tuple, Union
  import torch
  import torch.distributed
  from torch import Tensor
  from torch._utils import _get_device_module
  from torch.distributed._shard._utils import narrow_tensor_by_index
  from torch.distributed.checkpoint._checkpointer import _Checkpointer
  from torch.futures import Future
  from .metadata import Metadata, MetadataIndex
  from .planner import LoadItemType, LoadPlan, LoadPlanner, ReadItem, SavePlan, SavePlanner, WriteItem, WriteItemType
  from .storage import StorageReader, StorageWriter, WriteResult
  from .utils import _create_file_view
label_desc: Use image node_id 1 to create a new _FileSystemCheckpointer object from inherited base classes: _Checkpointer with example: obj = _FileSystemCheckpointer(path)