浏览代码

fix issues for hq testers: I277HD, I277HV

tags/v1.1.0
tinazhang 5 年前
父节点
当前提交
6f31bdbf67
共有 4 个文件被更改,包括 8 次插入6 次删除
  1. +1
    -1
      mindspore/ccsrc/minddata/dataset/engine/cache/cache_client.cc
  2. +3
    -3
      mindspore/ccsrc/minddata/dataset/engine/cache/cache_grpc_client.cc
  3. +1
    -0
      mindspore/ccsrc/minddata/dataset/engine/cache/cache_grpc_client.h
  4. +3
    -2
      tests/ut/python/dataset/test_cache_nomap.py

+ 1
- 1
mindspore/ccsrc/minddata/dataset/engine/cache/cache_client.cc 查看文件

@@ -217,7 +217,7 @@ Status CacheClient::CreateCache(uint32_t tree_crc, bool generate_id) {
// That is allowed, however the crc better match!
if (server_connection_id_) {
if (cinfo_.crc() != tree_crc) {
RETURN_STATUS_UNEXPECTED("Attempt to re-use a cache for a different tree!");
RETURN_STATUS_UNEXPECTED("Cannot re-use a cache for a different tree!");
}
// Check the state of the server. For non-mappable case where there is a build phase and a fetch phase, we should
// skip the build phase.


+ 3
- 3
mindspore/ccsrc/minddata/dataset/engine/cache/cache_grpc_client.cc 查看文件

@@ -20,7 +20,7 @@ namespace dataset {
CacheClientGreeter::~CacheClientGreeter() { (void)ServiceStop(); }

CacheClientGreeter::CacheClientGreeter(const std::string &hostname, int32_t port, int32_t num_connections)
: num_connections_(num_connections), request_cnt_(0) {
: num_connections_(num_connections), request_cnt_(0), port_(port) {
grpc::ChannelArguments args;
// We need to bump up the message size to unlimited. The default receiving
// message limit is 4MB which is not big enough.
@@ -119,8 +119,8 @@ Status CacheClientGreeter::WorkerEntry() {
auto error_code = rq->rc_.error_code();
std::string err_msg;
if (error_code == grpc::StatusCode::UNAVAILABLE) {
err_msg =
"Cache server is unreachable. Make sure the server is running. GRPC Code" + std::to_string(error_code);
err_msg = "Cache server with port " + std::to_string(port_) +
" is unreachable. Make sure the server is running. GRPC Code" + std::to_string(error_code);
} else {
err_msg = rq->rc_.error_message() + ". GRPC Code " + std::to_string(error_code);
}


+ 1
- 0
mindspore/ccsrc/minddata/dataset/engine/cache/cache_grpc_client.h 查看文件

@@ -96,6 +96,7 @@ class CacheClientGreeter : public Service {
mutable std::mutex mux_;
std::map<int64_t, std::unique_ptr<CacheClientRequestTag>> req_;
SharedMemory mem_;
int32_t port_;
};
} // namespace dataset
} // namespace mindspore


+ 3
- 2
tests/ut/python/dataset/test_cache_nomap.py 查看文件

@@ -590,7 +590,7 @@ def test_cache_nomap_disallowed_share1():

with pytest.raises(RuntimeError) as e:
sum([1 for _ in ds2])
assert "Attempt to re-use a cache for a different tree!" in str(e.value)
assert "Cannot re-use a cache for a different tree!" in str(e.value)

logger.info("test_cache_nomap_disallowed_share1 Ended.\n")

@@ -1182,7 +1182,8 @@ def test_cache_nomap_server_stop():
num_iter = 0
for _ in ds1.create_dict_iterator():
num_iter += 1
assert "Network error. Cache server is unreachable. Make sure the server is running." in str(e.value)
assert "Network error. Cache server with port 50052 is unreachable. Make sure the server is running." in \
str(e.value)

logger.info("test_cache_nomap_server_stop Ended.\n")



正在加载...
取消
保存