提交 ba01949d 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!1306 Adding warning to sync_wait usage

Merge pull request !1306 from EricZ/master
......@@ -1301,6 +1301,8 @@ class SyncWaitDataset(DatasetOp):
self._pair = BlockReleasePair(num_batch, callback)
if self._condition_name in self.input[0].get_sync_notifiers():
raise RuntimeError("Condition name is already in use")
logger.warning("Please remember to add dataset.sync_update(condition=%s), otherwise will result in hanging",
condition_name)
def get_sync_notifiers(self):
return {**self.input[0].get_sync_notifiers(), **{self._condition_name: self._pair.release_func}}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册