Skip to content

Commit

Permalink
add logs for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
sadikneipp committed Nov 9, 2024
1 parent d7fb31c commit 3d3eaed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pathwaysutils/persistence/pathways_orbax_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ async def deserialize(
inputs_by_global_mesh[global_mesh].append(i)

results = [None] * len(infos)

for global_mesh, idxs in inputs_by_global_mesh.items():

logging.warning(f"[ksadi] restore loop will take {len(inputs_by_global_mesh.items())} iterations")
for i, global_mesh, idxs in enumerate(inputs_by_global_mesh.items()):
grouped_infos = [infos[idx] for idx in idxs]
grouped_global_shapes = [global_shapes[idx] for idx in idxs]
grouped_dtypes = [dtypes[idx] for idx in idxs]
Expand Down Expand Up @@ -178,6 +179,7 @@ async def deserialize(
array_and_future[1] for array_and_future in grouped_arrays_and_futures
]

logging.warning(f"for loop {i}, {len(futures)} being waited on")
_ = concurrent.futures.wait(
futures, return_when=concurrent.futures.ALL_COMPLETED
)
Expand Down

0 comments on commit 3d3eaed

Please sign in to comment.