Git Product home page Git Product logo

Comments (7)

Zhaohaoran1997 avatar Zhaohaoran1997 commented on August 14, 2024

Traceback (most recent call last):
File "bert.py", line 655, in
main()
File "bert.py", line 545, in main
args.local_rank), num_labels=len(label_list))
File "/home/zhaohaoran/anaconda3/lib/python3.7/site-packages/pytorch_pretrained_bert/modeling.py", line 573, in from_pretrained
archive.extractall(tempdir)
File "/home/zhaohaoran/anaconda3/lib/python3.7/tarfile.py", line 2002, in extractall
numeric_owner=numeric_owner)
File "/home/zhaohaoran/anaconda3/lib/python3.7/tarfile.py", line 2044, in extract
numeric_owner=numeric_owner)
File "/home/zhaohaoran/anaconda3/lib/python3.7/tarfile.py", line 2114, in _extract_member
self.makefile(tarinfo, targetpath)
File "/home/zhaohaoran/anaconda3/lib/python3.7/tarfile.py", line 2163, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
File "/home/zhaohaoran/anaconda3/lib/python3.7/tarfile.py", line 247, in copyfileobj
buf = src.read(bufsize)
File "/home/zhaohaoran/anaconda3/lib/python3.7/gzip.py", line 276, in read
return self._buffer.read(size)
File "/home/zhaohaoran/anaconda3/lib/python3.7/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/home/zhaohaoran/anaconda3/lib/python3.7/gzip.py", line 482, in read
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached

from bert_chinese_pytorch.

Zhaohaoran1997 avatar Zhaohaoran1997 commented on August 14, 2024

@liuyijiang1994

from bert_chinese_pytorch.

liuyijiang1994 avatar liuyijiang1994 commented on August 14, 2024

这个看上去感觉是下载下来的压缩文件解压失败 可能是下载的文件不完整或者是已经存在要下载但是没下载完的文件报的错,可以试试删除你的bert pretrained下载的那部分内容,对应的是from_pretrained方法中cache_dir这个目录

from bert_chinese_pytorch.

Zhaohaoran1997 avatar Zhaohaoran1997 commented on August 14, 2024

from_pretrained

可是cache文件夹我已经删除重下好几次了

from bert_chinese_pytorch.

Zhaohaoran1997 avatar Zhaohaoran1997 commented on August 14, 2024

我甚至创建了一个新的用户来从头下载包运行程序,但是没变化

from bert_chinese_pytorch.

liuyijiang1994 avatar liuyijiang1994 commented on August 14, 2024

更换一个cache目录呢?

from bert_chinese_pytorch.

Zhaohaoran1997 avatar Zhaohaoran1997 commented on August 14, 2024

可能是我给数字化的标签加引号了,感觉这个错误在这里并不仅是模型错误触发的

from bert_chinese_pytorch.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.