Giter Club home page Giter Club logo

作者您好,请问想要使用GenKGC模型来训练给出的阿里中文数据集,在执行openbg.sh脚本文件前还需要做什么其他操作吗,现在两个英文数据集可以正常运行,但是中文数据集运行失败了 about promptkg HOT 4 CLOSED

star-rui avatar star-rui commented on May 18, 2024
作者您好,请问想要使用GenKGC模型来训练给出的阿里中文数据集,在执行openbg.sh脚本文件前还需要做什么其他操作吗,现在两个英文数据集可以正常运行,但是中文数据集运行失败了

from promptkg.

Comments (4)

CheaSim avatar CheaSim commented on May 18, 2024

你好,针对中文数据集需要将backbone model换成中文的bart,如fnlp/bart-base-chinese. 如果仍然有运行错误,可以将您的错误截图贴出来。

from promptkg.

star-rui avatar star-rui commented on May 18, 2024

作者您好,目前运行遇到的错误如下,现在还没把这个报错解决,
$ /bin/sh E:/project/GenKGC/openbg.sh
Global seed set to 7
tokenize the prefix tree: 0%| | 0/269658 [00:00<?, ?it/s]
定妆喷雾 [101, 8335, 7816, 6857, 23292, 102]
普通装 [101, 11072, 21562, 19731, 102]
长袖上衣 [101, 22915, 19684, 4906, 19633, 102]
常规 [101, 8992, 19977, 102]
T恤 [101, 156, 9545, 102]
tokenize the prefix tree: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 269658/269658 [00:27<00:00, 9920.46it/s]
max output length : 128
total 0 cannot be tokenized
Traceback (most recent call last):
File "main.py", line 159, in
main()
File "main.py", line 101, in main
params_dict = torch.load(args.checkpoint, map_location="cpu")['state_dict']
File "D:\Anaconda\anaconda\envs\genkgc\lib\site-packages\torch\serialization.py", line 579, in load
with _open_file_like(f, 'rb') as opened_file:
File "D:\Anaconda\anaconda\envs\genkgc\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "D:\Anaconda\anaconda\envs\genkgc\lib\site-packages\torch\serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'output/epoch=5-Eval/hits10=0.25.ckpt'

from promptkg.

star-rui avatar star-rui commented on May 18, 2024

作者您好,在openbg.sh这个脚本文件中,提到的output/epoch=5-Eval/hits10=0.25.ckpt 这个权重文件,没有在项目中找到,请问能否麻烦您发到我的邮箱[email protected],现在不能加载预训练的权重文件,代码无法执行成功。
非常感谢!!

from promptkg.

CheaSim avatar CheaSim commented on May 18, 2024

您好,运行openbg.sh时只需要使用facebook的中文bart-base的预训练权重,不需要checkpoint这个参数,目前已经修改了对应的代码。

from promptkg.

Related Issues (20)

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.