PaddleNLP
PaddleNLP copied to clipboard
UIE 模型微调时报错 '_DataLoaderIterSingleProcess' object has no attribute '_shutdown'
- 版本、环境信息
1)PaddleNLP和PaddlePaddle版本:PaddleNLP 2.3.1,在百度飞浆平台运行的
[2022-07-22 15:00:10,628] [ INFO] - Already cached /home/aistudio/.paddlenlp/models/ernie-3.0-base-zh/ernie_3.0_base_zh_vocab.txt
[2022-07-22 15:00:10,655] [ INFO] - We are using <class 'paddlenlp.transformers.ernie.modeling.ErnieModel'> to load 'ernie-3.0-base-zh'.
[2022-07-22 15:00:10,655] [ INFO] - Already cached /home/aistudio/.paddlenlp/models/ernie-3.0-base-zh/ernie_3.0_base_zh.pdparams
W0722 15:00:10.656873 1178 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 10.1
W0722 15:00:10.660554 1178 gpu_resources.cc:91] device: 0, cuDNN Version: 7.6.
[2022-07-22 15:00:13,390] [ INFO] - Weights from pretrained model not used in ErnieModel: ['cls.predictions.transform.weight', 'cls.predictions.layer_norm.weight', 'cls.predictions.transform.bias', 'cls.predictions.layer_norm.bias', 'cls.predictions.decoder_bias']
Init from: uie-base/model_state.pdparams
Global step count of 8015
Traceback (most recent call last):
File "finetune.py", line 164, in
do_train() File "finetune.py", line 96, in do_train for batch in train_data_loader: File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/reader.py", line 558, in iter return _DataLoaderIterSingleProcess(self) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 155, in init super(_DataLoaderIterSingleProcess, self).init(loader) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 99, in init self._prefetch_factor = loader.prefetch_factor AttributeError: 'DataLoader' object has no attribute 'prefetch_factor' Exception ignored in: <function _DataLoaderIterSingleProcess.del at 0x7f763bfbbb00> Traceback (most recent call last): File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 339, in del self._try_shutdown_all() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 324, in _try_shutdown_all if not self._shutdown: AttributeError: '_DataLoaderIterSingleProcess' object has no attribute '_shutdown'
@usstroot 辛苦提供下可复现代码或者公开的AIStudio项目地址
@usstroot 辛苦提供下可复现代码或者公开的AIStudio项目地址 比如下面这个项目,微调的时候会报错 https://aistudio.baidu.com/aistudio/projectdetail/4222268?channelType=0&channel=0
升级paddlenlp的版本到2.3.4再试下呢
paddlenlp2.3.4版本是在哪个镜像下面呢?公司系统直接pip install paddlenlp==2.3.4,网络访问不了
paddlenlp2.3.4版本是在哪个镜像下面呢?公司系统直接pip install paddlenlp==2.3.4,网络访问不了
试下从这里下载wheel包然后离线安装 https://pypi.org/project/paddlenlp/#files
paddle的版本也是需要更新到最新的版本
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。
This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。
paddlepaddle 2.3.1 有这个问题
paddlepaddle 2.3.0 paddlenlp 2.3.4可以走通