@@ -43,7 +43,7 @@ class AsyncOptions:
4343 post_finalization_callback:
4444 A function that is called after the async save operation is complete.
4545 create_directories_asynchronously:
46- If true, create directories asynchronously in the background.
46+ If True, creates directories asynchronously in the background.
4747 """
4848
4949 timeout_secs : int = 600 # 10 minutes.
@@ -67,15 +67,16 @@ class MultiprocessingOptions:
6767 all hosts will be considered as primary. It's useful in the case that all
6868 hosts are only working with local storage.
6969 active_processes:
70- A set of process indices (corresponding to `multihost.process_index()`) over
71- which `CheckpointManager` is expected to be called. This makes it possible
72- to have a `CheckpointManager` instance that runs over a subset of processes,
73- rather than all processes as it is normally expected to do. If specified,
74- `primary_host` must belong to `active_processes`.
70+ A set of process indices (corresponding to :py:func:`.process_index`) over
71+ which :py:class:`~.v1.training.Checkpointer` is expected to be called.
72+ This makes it possible to have a :py:class:`~.v1.training.Checkpointer`
73+ instance that runs over a subset of processes, rather than all processes as
74+ it is normally expected to do. If specified, `primary_host` must belong to
75+ `active_processes`.
7576 barrier_sync_key_prefix:
7677 A string to be prepended to the barrier sync key used to synchronize
7778 processes. This is useful to avoid collisions with other barrier syncs if
78- another CheckpointManager is being used concurrently.
79+ another :py:class:`~.v1.training.Checkpointer` is being used concurrently.
7980 """
8081
8182 primary_host : int | None = 0
@@ -102,20 +103,20 @@ class FileOptions:
102103 https://github.com/google/etils/blob/main/etils/epath/backend.py if your
103104 path is supported. default=None.
104105 temporary_path_class:
105- A class that is used to create and finallize temporary paths, and to
106- ensure atomicity.
106+ A class that is used to create and finalize temporary paths, and to ensure
107+ atomicity.
107108 path_class:
108- The implementation of `path_types. Path` to use. Defaults to
109- `etils.epath.Path`, but may be overridden to some other subclass of
110- `path_types .Path`.
109+ The implementation of :py:class:`~.v1.path. Path` to use. Defaults to
110+ `etils.epath.Path`, but may be overridden to some other subclass of
111+ :py:class:`~.v1.path .Path`.
111112 """
112113
113114 path_permission_mode : int | None = None
114115 temporary_path_class : type [atomicity_types .TemporaryPath ] | None = None
115116 path_class : type [path_types .Path ] = epath .Path
116117
117118 def v0 (self ) -> v0_options_lib .FileOptions :
118- """Converts this FileOptions to a v0 FileOptions."""
119+ """Converts this :py:class:`~.v1.options. FileOptions` to a v0 :py:class:`~orbax.checkpoint.options. FileOptions` ."""
119120 return v0_options_lib .FileOptions (
120121 path_permission_mode = self .path_permission_mode ,
121122 )
@@ -141,11 +142,12 @@ class Saving:
141142
142143 create_array_storage_options_fn:
143144 A function that is called in order to create
144- `ArrayOptions.Saving.StorageOptions` for each leaf in a PyTree, when it is
145+ :py:class:`.ArrayOptions.Saving.StorageOptions` for each leaf in a PyTree,
146+ when it is
145147 being saved. It is called similar to:
146148 `jax.tree.map_with_path(create_array_storage_options_fn, pytree_to_save)`.
147149 If provided, it overrides any default settings in
148- ` ArrayOptions.Saving.StorageOptions`.
150+ :py:class:`. ArrayOptions.Saving.StorageOptions`.
149151 pytree_metadata_options: Options for managing PyTree metadata.
150152 """
151153
@@ -230,19 +232,19 @@ class StorageOptions:
230232
231233 dtype:
232234 If provided, casts the parameter to the given dtype before saving.
233- Note that the parameter must be compatible with the given type (e.g.
234- jnp.bfloat16 is not compatible with np.ndarray).
235+ Note that the parameter must be compatible with the given type (e.g.,
236+ ` jnp.bfloat16` is not compatible with ` np.ndarray` ).
235237 chunk_byte_size:
236238 This is an experimental feature that automatically chooses the largest
237- chunk shape possible, while keeping the chunk byte size less than or
238- equal to the specified chunk_byte_size. Both the write_chunk_shape and
239- read_chunk_shape are automatically set to the chosen shape. This uses a
240- greedy algorithm that prioritizes splitting the largest dimensions
239+ possible chunk shape while keeping the chunk byte size less than or
240+ equal to the specified ` chunk_byte_size` . Both ` write_chunk_shape` and
241+ ` read_chunk_shape` are automatically set to the chosen shape. This uses
242+ a greedy algorithm that prioritizes splitting the largest dimensions
241243 first.
242244 shard_axes:
243- An optional list of axes that should be prioritized when sharding array
244- for storage. If empty, storage sharding implementation will prioritize
245- axes which are already sharded.
245+ An optional list of axes that should be prioritized when sharding an
246+ array for storage. If empty, the storage sharding implementation will
247+ prioritize axes which are already sharded.
246248 """
247249
248250 dtype : np .typing .DTypeLike | None = None
@@ -322,9 +324,9 @@ class CheckpointablesOptions:
322324 first because it is registered first.
323325
324326 Attributes:
325- registry: A ` CheckpointableHandlerRegistry` that is used to resolve
326- ` CheckpointableHandler` classes for each provided `checkpointable` during
327- saving and loading.
327+ registry: A :py:class:`. CheckpointableHandlerRegistry` that is used to
328+ resolve :py:class:`. CheckpointableHandler` classes for each provided
329+ `checkpointable` during saving and loading.
328330 """
329331
330332 registry : registration .CheckpointableHandlerRegistry = dataclasses .field (
0 commit comments