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

!3914 Fix Numpyslice e2e testcases problem

Merge pull request !3914 from xiefangqi/md_fix_numpyslice_e2e
......@@ -101,6 +101,13 @@ Status Sampler::GetAllIdsThenReset(py::array *data) {
// check this buffer is not a ctrl buffer
CHECK_FAIL_RETURN_UNEXPECTED(db->buffer_flags() == DataBuffer::kDeBFlagNone, "ERROR ctrl buffer received");
// perform error checking! Next buffer supposed to be EOE since last one already contains all ids for current epoch
RETURN_IF_NOT_OK(GetNextSample(&db));
CHECK_FAIL_RETURN_UNEXPECTED(db->eoe(), "ERROR Non EOE received");
// Reset Sampler since this is the end of the epoch
RETURN_IF_NOT_OK(ResetSampler());
{
py::gil_scoped_acquire gil_acquire;
if (Py_IsInitialized() == 0) {
......@@ -112,11 +119,6 @@ Status Sampler::GetAllIdsThenReset(py::array *data) {
return Status(StatusCode::kPyFuncException, e.what());
}
}
// perform error checking! Next buffer supposed to be EOE since last one already contains all ids for current epoch
RETURN_IF_NOT_OK(GetNextSample(&db));
CHECK_FAIL_RETURN_UNEXPECTED(db->eoe(), "ERROR Non EOE received");
// Reset Sampler since this is the end of the epoch
RETURN_IF_NOT_OK(ResetSampler());
return Status::OK();
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册