Skip to content

mindnlp里的示例代码mindnlp/llm/peft/prompt_tuning/roberta_sequence_classification.ipynb报错AttributeError: 'RobertaForSequenceClassification' object has no attribute 'modules_and_names' #1876

@StruggleTPH

Description

@StruggleTPH

Describe the bug/ 问题描述 (Mandatory / 必填)
在华为云使用mindnlp自带的示例代码mindnlp/llm/peft/prompt_tuning/roberta_sequence_classification.ipynb,在没改动代码的前提下,无法跑通,报错:AttributeError: 'RobertaForSequenceClassification' object has no attribute 'modules_and_names'

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

使用的华为云notebook,镜像mindspore_2.3.0-cann_8.0.rc2-py_3.9-euler_2.10.7-aarch64-snt9b,实例规格:Ascend: 1*ascend-snt9b1|ARM: 24核 192GB

To Reproduce / 重现步骤 (Mandatory / 必填)
直接使用mindnlp本身自带的代码,代码路径mindnlp/llm/peft/prompt_tuning/roberta_sequence_classification.ipynb

Screenshots/ 日志 / 截图 (Mandatory / 必填)
E9AD7AA7198678F2606329760171D0B2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions