mindspore-lab / mindnlp

Easy-to-use and high-performance NLP and LLM framework based on MindSpore, compatible with models and datasets of 🤗Huggingface.
https://mindnlp.cqu.ai/
Apache License 2.0
675 stars 180 forks source link

执行pytest_ut_st.sh时,在tests\st\test_bilstm_imdb.py中存在AttributeError: module 'mindspore.nn' has no attribute 'Module'错误 #1649

Closed imeet000 closed 2 days ago

imeet000 commented 3 weeks ago

Describe the bug/ 问题描述 (Mandatory / 必填) 在执行bash scripts/pytest_ut_st.sh时,tests\st\test_bilstm_imdb.py文件下存在AttributeError: module 'mindspore.nn' has no attribute 'Module'错误。具体问题如下 image

To Reproduce / 重现步骤 (Mandatory / 必填) Steps to reproduce the behavior: 1.Terminal中执行bash scripts/pytest_ut_st.sh 2.出现图中错误

Expected behavior / 预期结果 (Mandatory / 必填) 执行bash scripts/pytest_ut_st.sh,不出现上述报错

Screenshots/ 日志 / 截图 (Mandatory / 必填) 运行pytest_ut_st.sh后出现问题 image

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