Skip to content

[UPDATE JAX API] Update jax.experimental.array_serialization.serialization to latest JAX #1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions axlearn/common/array_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ async def _async_serialize(
and arr_inp.is_fully_addressable
)
# pylint: disable-next=protected-access
if not serialization._spec_has_metadata(tensorstore_spec):
if not serialization.ts_impl._spec_has_metadata(tensorstore_spec):
# pylint: disable-next=protected-access
tensorstore_spec["metadata"] = serialization._get_metadata(arr_inp)
if "dtype" not in tensorstore_spec:
Expand All @@ -274,14 +274,14 @@ async def _async_serialize(
# does no I/O operation and returns the tensorstore object. For every process other than `0`,
# we open with `assume_metadata=True`.
if jax.process_index() == 0:
await serialization.ts.open(
serialization.ts.Spec(tensorstore_spec),
await serialization.ts_impl.ts.open(
serialization.ts_impl.ts.Spec(tensorstore_spec),
create=True,
open=True,
context=serialization.TS_CONTEXT,
)
t = await serialization.ts.open(
serialization.ts.Spec(tensorstore_spec),
t = await serialization.ts_impl.ts.open(
serialization.ts_impl.ts.Spec(tensorstore_spec),
open=True,
assume_metadata=True,
context=serialization.TS_CONTEXT,
Expand Down