GithubHelp home page GithubHelp logo

Comments (4)

XM-WANG avatar XM-WANG commented on July 17, 2024 1

Many thanks for your help!

from autoprompt.

taylorshin avatar taylorshin commented on July 17, 2024

Only single token objects are considered for the label/prediction target. That error must mean that somehow one of the relation object labels is being split into multiple tokens. Do you mind sharing more details of your error so that we can pinpoint which label is causing it?

from autoprompt.

XM-WANG avatar XM-WANG commented on July 17, 2024

Many thanks for your reply!

Here I list some labels that will cause this error.

  • (P17): ValueError: Label "Romania" gets mapped to multiple tokens.
  • (P19): ValueError: Label "Constantinople" gets mapped to multiple tokens.
  • (P20): ValueError: Label "Edinburgh" gets mapped to multiple tokens.
  • (P27): ValueError: Label "Iceland" gets mapped to multiple tokens.

I wrote a script to automatically run the experiment with different relations. Nealy all relations contain some labels that trigger this error. I doubt that it is because of some wrong arguments I used.

This problem happened when I added the argument "--perturbed" for the relation extraction experiments with RoBERTa.

Could you please provide your command of the perturbed relation extraction experiments with RoBERTa?

from autoprompt.

taylorshin avatar taylorshin commented on July 17, 2024

For experiments with RoBERTa, we only used examples where the label is a single token for both BERT and RoBERTa. I added code that handles the aforementioned ValueError so if you pull the latest code from the master branch you should be able to run your command for creating triggers for perturbed relation extraction (with RoBERTa) without any errors.

from autoprompt.

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.