diff --git a/cmake/external_libs/icu4c.cmake b/cmake/external_libs/icu4c.cmake index d0a85530c8c..fc87efe947a 100644 --- a/cmake/external_libs/icu4c.cmake +++ b/cmake/external_libs/icu4c.cmake @@ -9,6 +9,7 @@ if(ENABLE_GITEE_EULER) set(ICU4C_SRC "${TOP_DIR}/build/mindspore/_deps/icu4c-src/icu4c") set(ICU4C_TAR_SRC "${TOP_DIR}/build/mindspore/_deps/icu4c-src") __download_pkg_with_git(icu4c ${GIT_REPOSITORY} ${GIT_TAG} ${MD5}) + execute_process(COMMAND mkdir ${ICU4C_SRC}) execute_process(COMMAND tar -xf ${ICU4C_TAR_SRC}/icu4c-69_1-src.tgz --strip-components 1 -C ${ICU4C_SRC}) else() if(ENABLE_GITEE) diff --git a/docs/api/api_python/dataset/mindspore.dataset.DIV2KDataset.rst b/docs/api/api_python/dataset/mindspore.dataset.DIV2KDataset.rst index 6ec64e869cc..65e90bbc509 100644 --- a/docs/api/api_python/dataset/mindspore.dataset.DIV2KDataset.rst +++ b/docs/api/api_python/dataset/mindspore.dataset.DIV2KDataset.rst @@ -10,7 +10,7 @@ mindspore.dataset.DIV2KDataset **参数:** - **dataset_dir** (str) - 包含数据集文件的根目录路径。 - - **usage** (str, 可选) - 指定数据集的子集。可取值为'train'、'valid'或'all'。默认值:'train',全部样本图片。 + - **usage** (str, 可选) - 指定数据集的子集。可取值为'train'、'valid'或'all'。默认值:'train'。 - **downgrade** (str, 可选) - 指定数据集的下采样的模式,可取值为'bicubic'、'unknown'、'mild'、'difficult'或'wild'。默认值:'bicubic'。 - **scale** (str, 可选) - 指定数据集的缩放尺度。当参数 `downgrade` 取值为'bicubic'时,此参数可以取值为2、3、4、8。 当参数 `downgrade` 取值为'unknown'时,此参数可以取值为2、3、4。当参数 `downgrade` 取值为'mild'、'difficult'、'wild'时,此参数仅可以取值为4。默认值:2。 diff --git a/mindspore/ccsrc/minddata/dataset/engine/consumers/tree_consumer.cc b/mindspore/ccsrc/minddata/dataset/engine/consumers/tree_consumer.cc index 610cd63a606..c134ea44fa6 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/consumers/tree_consumer.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/consumers/tree_consumer.cc @@ -389,6 +389,9 @@ Status SaveToDisk::ValidateParams() { LOG_AND_RETURN_STATUS_SYNTAX_ERROR(err); } std::string real_path; + if (dir.ParentPath().empty()) { + dir = Path(".") / dir; + } if (Path::RealPath(dir.ParentPath(), real_path).IsError()) { std::string err_msg = "SaveToDisk failed, can not get real dataset path: " + dir.ParentPath(); LOG_AND_RETURN_STATUS_SYNTAX_ERROR(err_msg); @@ -513,7 +516,9 @@ Status SaveToDisk::CheckTensorRowShapes(const std::unordered_map *header_ptr, c uint64_t &schema_id) { RETURN_UNEXPECTED_IF_NULL(header_ptr); auto schema_ptr = Schema::Build("mindrecord", schema); - CHECK_FAIL_RETURN_UNEXPECTED(schema_ptr != nullptr, - "[Internal ERROR] Failed to build schema: " + schema.dump() + "."); + CHECK_FAIL_RETURN_UNEXPECTED(schema_ptr != nullptr, "[Internal ERROR] Failed to build schema: " + schema.dump() + + "." + "Check the [ERROR] logs before for more details."); schema_id = (*header_ptr)->AddSchema(schema_ptr); // create index std::vector> id_index_fields; diff --git a/tests/ut/python/dataset/test_save_op.py b/tests/ut/python/dataset/test_save_op.py index c5e513a4fa7..969c9dee404 100644 --- a/tests/ut/python/dataset/test_save_op.py +++ b/tests/ut/python/dataset/test_save_op.py @@ -561,6 +561,8 @@ def test_case_10(): d1 = ds.GeneratorDataset(generator_dynamic_2d_1, ["data"], shuffle=False) with pytest.raises(Exception, match= - "Error: besides dimension 0, other dimension shape is different from the previous's"): + "Tensor with dynamic shape do not currently support saving. Except for the shape of " + "dimension 0, the other dimension shapes must be fixed. " + "You can reshape the Tensor to a fixed shape before saving."): d1.save(file_name_auto) remove_file(file_name_auto)