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

Method _try_manage_replacement

monai/data/dataset.py:1238–1251  ·  view source on GitHub ↗

Wait thread lock and replace training items in the background thread.

(self, check_round)

Source from the content-addressed store, hash-verified

1236 self._replace_done = True
1237
1238 def _try_manage_replacement(self, check_round):
1239 """
1240 Wait thread lock and replace training items in the background thread.
1241
1242 """
1243 with self._update_lock:
1244 if self._round <= 0:
1245 # shutdown replacement
1246 self._replace_done = True
1247 return True, -1
1248
1249 if self._round != check_round:
1250 self._compute_replacements()
1251 return False, self._round
1252
1253 def manage_replacement(self) -> None:
1254 """

Callers 1

manage_replacementMethod · 0.95

Calls 1

_compute_replacementsMethod · 0.95

Tested by

no test coverage detected