Comments (4)
Many thanks for your help!
from autoprompt.
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.
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.
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)
- Question on using this in conjunction with CLIP / Open_CLIP / VQGAN HOT 3
- How to run the code --queries HOT 1
- Two arguments missed in label_search.py HOT 1
- where is scripts/run_experiments.py HOT 2
- About accuracy HOT 2
- "Gradient-Based Prompt Search"&" Automating Label Token Selection".which one is the first step? HOT 1
- Label Search of NLI HOT 2
- I got different triggers with the one in fact_retrieval_bert_prompts.jsonl HOT 1
- How to run the code HOT 3
- Is there the code for downstream task in this project? HOT 2
- AttributeError: 'str' object has no attribute 'masked_select' HOT 2
- A program error in create_trigger.py for sentiment analysis task HOT 5
- A question for the meaning of letter 'Ġ' HOT 1
- where are the found prompts? HOT 1
- What is the T in your label search algorithm? HOT 2
- Question about code running on SNLI dataset
- Zero value for evaluation_fn in create_trigger.py
- 请问自己生成的的提示在哪里,我运行完prompt的程序也没见到自己生成的提示啊?
- Question about proper settings of prompt extraction attack.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoprompt.