support tar in dataset & fix a small bug in loop (#986)

Co-authored-by: Xu Yang <xuyang1@microsoft.com>
This commit is contained in:
Xu Yang
2025-06-25 15:32:37 +08:00
committed by GitHub
parent 1b762ceddd
commit 80d81c8ea9
2 changed files with 30 additions and 11 deletions
+4 -4
View File
@@ -219,6 +219,10 @@ class LoopBase:
result = func(self.loop_prev_out[li])
# Store result in the nested dictionary
self.loop_prev_out[li][name] = result
# Record the trace
end = datetime.datetime.now(datetime.timezone.utc)
self.loop_trace[li].append(LoopTrace(start, end, step_idx=si))
# Save snapshot after completing the step
self.dump(self.session_folder / f"{li}" / f"{si}_{name}")
except Exception as e:
@@ -239,10 +243,6 @@ class LoopBase:
raise # re-raise unhandled exceptions
finally:
if step_forward:
# Record execution trace and update progress bar
end = datetime.datetime.now(datetime.timezone.utc)
self.loop_trace[li].append(LoopTrace(start, end, step_idx=si))
# Increment step index
self.step_idx[li] = next_step_idx