Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Data type of 4th item of the input or its converted Numpy array is expected to be int or float or str, but got object. #1837

Open
wyx-lab opened this issue Nov 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@wyx-lab
Copy link

wyx-lab commented Nov 23, 2024

Describe the bug/ 问题描述 (Mandatory / 必填)
A clear and concise description of what the bug is.

dataset = load_dataset("FrancophonIA/XFUND", "French")
我load_dataset 后 想用for 迭代看一下dataset 但是报错了
TypeError: Data type of 4th item of the input or its converted Numpy array is expected to be int or float or str, but got object.

  • Hardware Environment(Ascend/GPU/CPU) / 硬件环境:

Please delete the backend not involved / 请删除不涉及的后端:
/device ascend/GPU/CPU/kirin/等其他芯片
Ascend910

  • Software Environment / 软件环境 (Mandatory / 必填):
    -- MindSpore version (e.g., 2.3.1.Bxxx) :Mindspore 2.3.1
    -- Python version (e.g., Python 3.9.0) : python 3.9.0
    -- OS platform and distribution (e.g., Linux Ubuntu 16.04):EulerOS 2.0
    -- GCC/Compiler version (if compiled from source):

  • Excute Mode / 执行模式 (Mandatory / 必填)(PyNative/Graph):

/mode pynative

To Reproduce / 重现步骤 (Mandatory / 必填)
Steps to reproduce the behavior:

from mindnlp.dataset import load_dataset
dataset = load_dataset("FrancophonIA/XFUND", "French")
for d in dataset:
print(d)
Expected behavior / 预期结果 (Mandatory / 必填)
A clear and concise description of what you expected to happen.
打印相关的内容
Screenshots/ 日志 / 截图 (Mandatory / 必填)
If applicable, add screenshots to help explain your problem.
图片

Additional context / 备注 (Optional / 选填)
Add any other context about the problem here.

@wyx-lab wyx-lab added the bug Something isn't working label Nov 23, 2024
@qhzhuang
Copy link
Contributor

在华为云ModelArts上使用mindspore2.3.0镜像,从pip安装mindnlp,版本信息:
Version: 0.4.0
Summary: An open source natural language processing research tool box. Git version: [sha1]:5b4dad33, [branch]: (HEAD -> master, ms/master)
运行上述代码没有报错。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants