Skip to content

Commit

Permalink
Make Self import compatible with Python < 3.11
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 707991932
  • Loading branch information
ChromeHearts authored and Orbax Authors committed Dec 19, 2024
1 parent b79a298 commit f85f6ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions checkpoint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.10.3] - 2024-12-19

### Added
- `HandlerTypeRegistry` that globally tracks all handler types, which will allow
`CompositeCheckpointHandler.metadata()` to retrieve item metadata by
Expand All @@ -16,6 +18,7 @@ default-constructing `CheckpointHandler`s when they're listed in the saved
### Fixed
- Ignore not-exists and not-dir errors while building step metadata in
_StandardNameFormat.
- Fix `Self` import in `replicator_checkpoint_manager.py`.

### Changed
- Return `StepMetadata` from `CompositeCheckpointHandler.metadata()`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

from collections.abc import Mapping
import dataclasses
from typing import Any, Callable, Iterable, Self, Sequence

from typing import Any, Callable, Iterable, Sequence
from absl import logging
from etils import epath
from etils import epy
Expand All @@ -36,6 +35,7 @@
from orbax.checkpoint._src.serialization import type_handlers
from orbax.checkpoint.experimental.emergency import mesh_consistency
from orbax.checkpoint.path import step as step_lib
from typing_extensions import Self # for Python version < 3.11

PyTree = Any
DefaultCheckpointHandlerRegistry = (
Expand Down
2 changes: 1 addition & 1 deletion checkpoint/orbax/checkpoint/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# A new PyPI release will be pushed everytime `__version__` is increased.
# Also modify version and date in CHANGELOG.
__version__ = '0.10.2'
__version__ = '0.10.3'


# TODO: b/362813406 - Add latest change timestamp and commit number.
Expand Down

0 comments on commit f85f6ca

Please sign in to comment.