We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 874e807 commit fe00c00Copy full SHA for fe00c00
deeplabcut/pose_estimation_pytorch/runners/shelving.py
@@ -149,9 +149,12 @@ def add_prediction(
149
self._frame_index += 1
150
151
def close(self) -> None:
152
- """Opens the shelf"""
+ """Closes the shelf and writes the updated metadata"""
153
if self._open and self._frame_index > 0:
154
- self._db["metadata"]["nframes"] = self._frame_index
+ # Write updated metadata to shelf (top-level indexing required for shelve)
155
+ metadata = self._db["metadata"]
156
+ metadata["nframes"] = self._frame_index
157
+ self._db["metadata"] = metadata
158
159
super().close()
160
0 commit comments