【求助】算力云上运行Image Captioning 任务与模型执⾏VQA任务报错 #280

Open
opened 2024-10-24 14:10:05 +08:00 by LIN · 12 comments

报错内容如下,是通过老师给的镜像建的实例

报错内容如下,是通过老师给的镜像建的实例

这个错误通常发生在网络连接不稳定、服务器不可达或请求超时的情况下。解决这个问题可能需要检查网络连接、服务器状态或调整请求的超时设置。同学可以试试在jupyter最前面开一个cell,然后通过如下命令设置一下网站镜像:
!export HF_HOME=/root/autodl-tmp/huggingface-cache/
!export HF_ENDPOINT=https://hf-mirror.com
可以在命令行中直接用(不需要感叹号),或者是在jupyter单开一个cell在前面加!用。

这个错误通常发生在网络连接不稳定、服务器不可达或请求超时的情况下。解决这个问题可能需要检查网络连接、服务器状态或调整请求的超时设置。同学可以试试在jupyter最前面开一个cell,然后通过如下命令设置一下网站镜像: !export HF_HOME=/root/autodl-tmp/huggingface-cache/ !export HF_ENDPOINT=https://hf-mirror.com 可以在命令行中直接用(不需要感叹号),或者是在jupyter单开一个cell在前面加!用。

如果有后续的话在后面回我一下喔,我会跟进的~

如果有后续的话在后面回我一下喔,我会跟进的~
Author

如果有后续的话在后面回我一下喔,我会跟进的~

换了一个报错好像是什么文件错误?

> 如果有后续的话在后面回我一下喔,我会跟进的~ 换了一个报错好像是什么文件错误?

感觉是没有下载好bert-based-uncased模型啊,你试试把下面的代码再跑一遍,是不是之前忽略了报错?
image
如果没问题的话,麻烦你截图一下左侧的文件,看看autodl-tmp里面有没有bert-based-uncased这个模型?

感觉是没有下载好bert-based-uncased模型啊,你试试把下面的代码再跑一遍,是不是之前忽略了报错? ![image](/attachments/6ddc238d-4562-4235-b54a-2d6179e249b8) 如果没问题的话,麻烦你截图一下左侧的文件,看看autodl-tmp里面有没有bert-based-uncased这个模型?
Author

感觉是没有下载好bert-based-uncased模型啊,你试试把下面的代码再跑一遍,是不是之前忽略了报错?
image
如果没问题的话,麻烦你截图一下左侧的文件,看看autodl-tmp里面有没有bert-based-uncased这个模型?

应该是之前模型没有下载完整,我重新走了下下载代码运行显示这个

> 感觉是没有下载好bert-based-uncased模型啊,你试试把下面的代码再跑一遍,是不是之前忽略了报错? > ![image](/attachments/6ddc238d-4562-4235-b54a-2d6179e249b8) > 如果没问题的话,麻烦你截图一下左侧的文件,看看autodl-tmp里面有没有bert-based-uncased这个模型? 应该是之前模型没有下载完整,我重新走了下下载代码运行显示这个

使用pip install下载这个没有的包试试

使用pip install下载这个没有的包试试
Author

使用pip install下载这个没有的包试试

不行呀显示
ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none)
ERROR: No matching distribution found for torch.distributed.fsdp

> 使用pip install下载这个没有的包试试 不行呀显示 ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none) ERROR: No matching distribution found for torch.distributed.fsdp

使用pip install下载这个没有的包试试

不行呀显示
ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none)
ERROR: No matching distribution found for torch.distributed.fsdp

试试先更新一下pip包:
pip install --upgrade pip
然后再用镜像源下载试试,看能安装不:
pip install torch.distributed.fsdp -i https://pypi.tuna.tsinghua.edu.cn/simple

> > 使用pip install下载这个没有的包试试 > > 不行呀显示 > ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none) > ERROR: No matching distribution found for torch.distributed.fsdp 试试先更新一下pip包: pip install --upgrade pip 然后再用镜像源下载试试,看能安装不: pip install torch.distributed.fsdp -i https://pypi.tuna.tsinghua.edu.cn/simple
Author

使用pip install下载这个没有的包试试

不行呀显示
ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none)
ERROR: No matching distribution found for torch.distributed.fsdp

试试先更新一下pip包:
pip install --upgrade pip
然后再用镜像源下载试试,看能安装不:
pip install torch.distributed.fsdp -i https://pypi.tuna.tsinghua.edu.cn/simple

显示这个
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none)
ERROR: No matching distribution found for torch.distributed.fsdp
(base) root@autodl-container-c33846b235-d9deba44:~#

> > > 使用pip install下载这个没有的包试试 > > > > 不行呀显示 > > ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none) > > ERROR: No matching distribution found for torch.distributed.fsdp > > 试试先更新一下pip包: > pip install --upgrade pip > 然后再用镜像源下载试试,看能安装不: > pip install torch.distributed.fsdp -i https://pypi.tuna.tsinghua.edu.cn/simple > 显示这个 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: Could not find a version that satisfies the requirement torch.distributed.fsdp (from versions: none) ERROR: No matching distribution found for torch.distributed.fsdp (base) root@autodl-container-c33846b235-d9deba44:~#

提供的镜像里面,blip使用的环境是名为blip的conda环境,所以:

  1. 在命令行执行环境时,需要先使用conda activate blip进入blip的conda的环境。
  2. 在jypter notebook中,需要修改成blip的内核才能使用blip的环境
    image
    image
提供的镜像里面,blip使用的环境是名为blip的conda环境,所以: 1. 在命令行执行环境时,需要先使用conda activate blip进入blip的conda的环境。 2. 在jypter notebook中,需要修改成blip的内核才能使用blip的环境 <img width="832" alt="image" src="/attachments/605b0e29-1ced-4bc1-8afd-e07cede9adc6"> <img width="803" alt="image" src="/attachments/6a26c46a-7744-474f-8f2a-106ef413e8be">
182 KiB
177 KiB
Author

提供的镜像里面,blip使用的环境是名为blip的conda环境,所以:

  1. 在命令行执行环境时,需要先使用conda activate blip进入blip的conda的环境。
  2. 在jypter notebook中,需要修改成blip的内核才能使用blip的环境
    image
    image

用base环境运行会显示缺少torch.distributed.fsdp模块,用blip环境运行会显示The size of tensor a (3) must match the size of tensor b (9) at non-singleton dimension 0

> 提供的镜像里面,blip使用的环境是名为blip的conda环境,所以: > 1. 在命令行执行环境时,需要先使用conda activate blip进入blip的conda的环境。 > 2. 在jypter notebook中,需要修改成blip的内核才能使用blip的环境 > <img width="832" alt="image" src="/attachments/605b0e29-1ced-4bc1-8afd-e07cede9adc6"> > <img width="803" alt="image" src="/attachments/6a26c46a-7744-474f-8f2a-106ef413e8be"> 用base环境运行会显示缺少torch.distributed.fsdp模块,用blip环境运行会显示The size of tensor a (3) must match the size of tensor b (9) at non-singleton dimension 0

提供的镜像里面,blip使用的环境是名为blip的conda环境,所以:

  1. 在命令行执行环境时,需要先使用conda activate blip进入blip的conda的环境。
  2. 在jypter notebook中,需要修改成blip的内核才能使用blip的环境
    image
    image

用base环境运行会显示缺少torch.distributed.fsdp模块,用blip环境运行会显示The size of tensor a (3) must match the size of tensor b (9) at non-singleton dimension 0

出现这个报错的话就不用beam search,把那一行注释掉,用下面的那个方法就可以了,这是版本问题

> > 提供的镜像里面,blip使用的环境是名为blip的conda环境,所以: > > 1. 在命令行执行环境时,需要先使用conda activate blip进入blip的conda的环境。 > > 2. 在jypter notebook中,需要修改成blip的内核才能使用blip的环境 > > <img width="832" alt="image" src="/attachments/605b0e29-1ced-4bc1-8afd-e07cede9adc6"> > > <img width="803" alt="image" src="/attachments/6a26c46a-7744-474f-8f2a-106ef413e8be"> > > 用base环境运行会显示缺少torch.distributed.fsdp模块,用blip环境运行会显示The size of tensor a (3) must match the size of tensor b (9) at non-singleton dimension 0 > > 出现这个报错的话就不用beam search,把那一行注释掉,用下面的那个方法就可以了,这是版本问题
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#280
No description provided.