name | about | labels |
---|---|---|
Bug Report | Use this template for reporting a bug | kind/bug |
Dataset row processing _convert_row
method (mindspore/python/mindspore/dataset/engine/datasets_user_defined.py
) possibly issuing excessive conversion of items to np.array
if the object is already of type np.ndarray
.
Hardware Environment(Ascend
/GPU
/CPU
) / 硬件环境: CPU
Software Environment / 软件环境 (Mandatory / 必填):
-- MindSpore version (e.g., 1.7.0.Bxxx) : 2.2.1 (from related tag)
-- Python version (e.g., Python 3.7.5) : CPython 3.9.18
-- OS platform and distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 20.04
-- GCC/Compiler version (if compiled from source): GCC 9.4.0
Excute Mode / 执行模式 (Mandatory / 必填)(PyNative
/Graph
): N/A
N/A
N/A (code does not lead to any execution issues)
Items of type np.ndarray
should be directly added to the result value.
N/A
It seems for us that np.ndarray
row/row items can be directly added to the result value instead of calling np.array(x, copy=False)
, because np.array()
NumPy method is designed to create the same np.ndarray
object.
We assume this change can result in minor performance improvement in processing dataset rows.
For the demonstration of improvement, take a look at the commit in our fork: https://gitee.com/GerasimovAlexander/mindspore/commit/e97457b0435691ed50bb85236a9f50c460546646
Please assign maintainer to check this issue.
请为此issue分配处理人。
@fangwenyi @chengxiaoli @Shawny
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
感谢您的提问,您可以评论//mindspore-assistant更快获取帮助:
Duplicate of #I9IQNB:(Possible) excessive conversion of dataset items of type np.ndarray, created by Gitee internal server error. Close, please
登录 后才可以发表评论