Skip to content

Commit d052212

Browse files
ConchylicultorThe etils Authors
authored and
The etils Authors
committed
Fix orbax error in open-source
PiperOrigin-RevId: 735379386
1 parent 99e988e commit d052212

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Changelog follow https://keepachangelog.com/ format.
88

99
## [Unreleased]
1010

11+
## [1.12.2] - 2025-03-10
12+
13+
* `enp`:
14+
* Fix orbax ArraySpec issue.
15+
1116
## [1.12.1] - 2025-02-07
1217

1318
* `enp`:
@@ -486,7 +491,8 @@ Changelog follow https://keepachangelog.com/ format.
486491

487492
<!-- mdlint off(LINK_UNUSED_ID) -->
488493

489-
[Unreleased]: https://github.com/google/etils/compare/v1.12.1...HEAD
494+
[Unreleased]: https://github.com/google/etils/compare/v1.12.2...HEAD
495+
[1.12.2]: https://github.com/google/etils/compare/v1.12.1...v1.12.2
490496
[1.12.1]: https://github.com/google/etils/compare/v1.12.0...v1.12.1
491497
[1.12.0]: https://github.com/google/etils/compare/v1.11.0...v1.12.0
492498
[1.11.0]: https://github.com/google/etils/compare/v1.10.0...v1.11.0

etils/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# A new PyPI release will be pushed everytime `__version__` is increased
1818
# When changing this, also update the CHANGELOG.md
19-
__version__ = '1.12.1'
19+
__version__ = '1.12.2'
2020

2121
# Do NOT add anything to this file. This is left empty on purpose.
2222
# Users should import subprojects directly.

etils/enp/array_spec.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ def _is_pygrain(array: Array) -> bool:
182182
def _is_orbax(array: Array) -> bool:
183183
if 'orbax.checkpoint' not in sys.modules:
184184
return False
185-
from orbax.checkpoint._src.serialization import type_handlers # pylint: disable=g-import-not-at-top # pytype: disable=import-error
185+
from orbax.checkpoint.metadata import value # pylint: disable=g-import-not-at-top # pytype: disable=import-error
186186

187187
return isinstance(
188188
array,
189189
(
190-
type_handlers.ArrayMetadata,
191-
type_handlers.ScalarMetadata,
190+
value.ArrayMetadata,
191+
value.ScalarMetadata,
192192
),
193193
)

0 commit comments

Comments
 (0)