File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
checkpoint/orbax/checkpoint/experimental/v1/_src/serialization Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,20 @@ async def deserialize(
267267
268268
269269class LeafHandler (Protocol [Leaf , AbstractLeaf ]):
270- """Interface for reading and writing a PyTree leaf."""
270+ """Interface for reading and writing a PyTree leaf.
271+
272+ This protocol defines the essential asynchronous operations for saving
273+ (`serialize`), loading (`deserialize`), and inspecting (`metadata`) individual
274+ leaf nodes within a PyTree. It is essentially a blueprint that allows for
275+ implementing support for serialization of custom leaf objects.
276+
277+ Example:
278+ This class is not intended to be used independently. It must be subclassed
279+ to implement custom LeafHandlers (class) for specific leaf types.
280+
281+ See: `Custom Leaf Handler <
282+ https://orbax.readthedocs.io/en/latest/guides/checkpoint/v1/customization.html#custom-leaf-handler>`_
283+ """
271284
272285 async def serialize (
273286 self ,
You can’t perform that action at this time.
0 commit comments