Skip to content

Commit cf5a1ce

Browse files
angel-coreOrbax Authors
authored andcommitted
Fix Pytree Metadata resolution and refactor V0 Layout logic
PiperOrigin-RevId: 869831730
1 parent 2520b09 commit cf5a1ce

File tree

13 files changed

+835
-369
lines changed

13 files changed

+835
-369
lines changed

checkpoint/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
- #v1 Make most V1 public concrete classes final.
2525
- Refactor `CheckpointLayout` splitting `load()` into `load_pytree()` and
2626
`load_checkpointables()` each with their own dedicated loading logic
27+
- Refactor v0 Pytree validation and metadata resolution and add `OrbaxV0Layout`
28+
tests
2729

2830
## [0.11.32] - 2026-01-20
2931

checkpoint/orbax/checkpoint/experimental/v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from orbax.checkpoint.experimental.v1._src.context.context import (
3838
Context,
3939
)
40-
from orbax.checkpoint.experimental.v1._src.layout.orbax_layout import (
40+
from orbax.checkpoint.experimental.v1._src.layout.registry import (
4141
is_orbax_checkpoint,
4242
)
4343
from orbax.checkpoint.experimental.v1._src.loading.loading import (

checkpoint/orbax/checkpoint/experimental/v1/_src/handlers/composite_handler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ def _get_saved_handler_typestrs(
291291
directory,
292292
)
293293

294+
# TODO(b/475265289): Currently, we rely solely on CHECKPOINT_METADATA to
295+
# find available checkpointables, ignoring valid subdirectories. We
296+
# should update the composite handler to validate subdirectories to
297+
# check if any either represents a valid pytree checkpointable or has a
298+
# name that is registered in the handler registry.
294299
saved_handler_typestrs: dict[str, str] = {}
295300
for checkpointable_path in directory.iterdir():
296301
if not checkpointable_path.is_dir():

0 commit comments

Comments
 (0)