• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""A module holding enum determining checkpoint format type.
2
3This FCP module should be kept lightweight as it is used for enum flag
4definition purposes.
5"""
6
7import enum
8
9
10@enum.unique
11class CheckpointFormatType(enum.Enum):
12  """Option adjusting checkpoint format between client and server.
13
14  Values:
15    TF1_SAVE_SLICES: The default value. Uses a standard TFv1 format.
16    APPEND_SLICES_MERGE_WRITE: Experimental value allowing to stream data to
17      checkpoint. The conversion from stream of checkpoint slices to TFv1 format
18      happens right after all the chunks are written. So the transport format is
19      identical to the TF1_SAVE_SLICES option.
20    APPEND_SLICES_MERGE_READ: Experimental value allowing to stream data to
21      checkpoint. The conversion from stream of checkpoint slices to TFv1 format
22      happens before the data is read. So the transport format is the
23      appended slices format. This setting has the smallest write memory
24      overhead.
25  """
26
27  TF1_SAVE_SLICES = 'tf1_save_slices'
28  APPEND_SLICES_MERGE_WRITE = 'append_slices_merge_write'
29  APPEND_SLICES_MERGE_READ = 'append_slices_merge_read'
30