Skip to content
Merged
Show file tree
Hide file tree
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
171 changes: 0 additions & 171 deletions pathwaysutils/elastic/README.md

This file was deleted.

7 changes: 6 additions & 1 deletion pathwaysutils/persistence/orbax_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,15 @@ async def serialize(
if any([arg.dtype is not None for arg in args]):
raise ValueError("Casting during save not supported for Pathways.")

# Create a copy of the arrays to ensure their buffers are not deallocated
# before the asynchronous write operation completes.
copied_values = [v.copy() for v in values]
jax.block_until_ready(copied_values)

locations, names = extract_parent_dir_and_name(infos)
return [
future.CommitFutureAwaitingContractedSignals(
self._background_serialize(values, locations, names),
self._background_serialize(copied_values, locations, names),
name="cloud_pathways_array_handler",
)
]
Expand Down