GithubHelp home page GithubHelp logo

Comments (5)

guihonghao avatar guihonghao commented on May 26, 2024

你的示例数据example中不包含"output"字段

from deepke.

Euphoria0924 avatar Euphoria0924 commented on May 26, 2024

你的示例数据example中不包含"output"字段

你好,十分感谢及时回复!示例中不包含output但是通过了preprocess.py处理过后转换成了识别示例中的data字段,这个data字段在英文示例中存在,运行没有报错;但同样格式的中文示例虽然存在该字段,却无法识别该字段并且报错。

from deepke.

guihonghao avatar guihonghao commented on May 26, 2024

看看你转换后的数据。example中需要包含"output"字段。

from deepke.

Euphoria0924 avatar Euphoria0924 commented on May 26, 2024

你好,转换的结果如下:Error executing job with overrides: []
[{'output': [{'E': 'ORG', 'W': '国务院'}, {'E': 'PER', 'W': '秦始皇'}, {'E': 'LOC', 'W': '陕西省'}, {'E': 'LOC', 'W': '西安市'}, {'E': 'TIME', 'W': '1961年'}]}]
Traceback (most recent call last):
File "D:\PycharmProjects\KGdemo\DeepKE-main\example\llm\LLMICL\run.py", line 47, in main
ie_prompter.build_prompt(
File "D:\anaconda3\envs\deepke-llm\lib\site-packages\easyinstruct\prompts\ie_prompt.py", line 123, in build_prompt
examples = self._get_incontext_examples(examples)
File "D:\anaconda3\envs\deepke-llm\lib\site-packages\easyinstruct\prompts\ie_prompt.py", line 272, in _get_incontext_examples
self.examples.append({"输出": str(example["output"])})
KeyError: 'output'

from deepke.

Euphoria0924 avatar Euphoria0924 commented on May 26, 2024

已经解决,原因是easyinstruct包下的ie_prompt文件第263行 for example in self.examples ,需要将self删去,感谢大家帮助,😄

from deepke.

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.