MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / update_cache

Method update_cache

monai/data/dataset.py:1179–1189  ·  view source on GitHub ↗

Update cache items for current epoch, need to call this function before every epoch. If the cache has been shutdown before, need to restart the `_replace_mgr` thread.

(self)

Source from the content-addressed store, hash-verified

1177 return True
1178
1179 def update_cache(self):
1180 """
1181 Update cache items for current epoch, need to call this function before every epoch.
1182 If the cache has been shutdown before, need to restart the `_replace_mgr` thread.
1183
1184 """
1185 self.start()
1186
1187 # make sure update is done
1188 while not self._try_update_cache():
1189 time.sleep(0.01)
1190
1191 def _try_shutdown(self):
1192 """

Callers 5

test_shapeMethod · 0.95
test_update_cacheMethod · 0.95
test_shuffleMethod · 0.95
test_set_dataMethod · 0.95
epoch_completedMethod · 0.80

Calls 2

startMethod · 0.95
_try_update_cacheMethod · 0.95

Tested by 4

test_shapeMethod · 0.76
test_update_cacheMethod · 0.76
test_shuffleMethod · 0.76
test_set_dataMethod · 0.76