Comments (4)
Your scripts are very hardcoded for data processing, one needs to change each and every processor for a differently structured data, or force-structure own data to the script
from pet.
Can you please specify the format of MNLI dataset that you used, based on which you wrote your preprocessors in tasks.py
from pet.
Hi there,
Your scripts are very hardcoded for data processing, one needs to change each and every processor for a differently structured data, or force-structure own data to the script
We did not design the task processors as "general purpose" solutions for different kinds of tasks/formats. Instead, they are supposed to provide a simple interface for implementing your own logic for your own data formats (as shown in this example): All you need to do is to define the get_train_examples
, get_dev_examples
, get_test_examples
, get_unlabeled_examples
and get_labels
methods, where the first four are supposed to return a list of InputExample
s (as defined here) and the last one returns a list of string labels.
The MNLI dataset that we used for our task processor is a tab-separated file with the keys (in that order) index
, promptID
, pairID
, genre
, sentence1_binary_parse
, sentence2_binary_parse
, sentence1_parse
, sentence2_parse
, sentence1
, sentence2
, label1
, ..., labeln
, gold_label
. However, the only information that we actually make use of in the task processor (see here) are the columns 0 (index
), 8 (sentence1
), 9 (sentence2
) and -1 (gold_label
).
For example, the first two lines of the dev (matched) set are:
index promptID pairID genre sentence1_binary_parse sentence2_binary_parse sentence1_parse sentence2_parse sentence1 sentence2 label1 label2 label3 label4 label5 gold_label
0 63735 63735n slate ( ( The ( new rights ) ) ( are ( nice enough ) ) ) ( Everyone ( really ( likes ( the ( newest benefits ) ) ) ) ) (ROOT (S (NP (DT The) (JJ new) (NNS rights)) (VP (VBP are) (ADJP (JJ nice) (RB enough))))) (ROOT (S (NP (NN Everyone)) (VP (ADVP (RB really)) (VBZ likes) (NP (DT the) (JJS newest) (NNS benefits))))) The new rights are nice enough Everyone really likes the newest benefits neutral entailment neutral neutral neutral neutral
You can either modify your own files to match that format or simply implement your own task processor that works with your input format. Let me know if you need any further help for that!
from pet.
Yes, thank you for the detailed answer,
Cheers.
from pet.
Related Issues (20)
- OSError: Model name 'clue/albert_chinese_tiny' was not found in tokenizers model name list HOT 2
- TypeError: expected str, bytes or os.PathLike object, not NoneType HOT 1
- ZeroDivisionError when reduction is set to 'wmean' while training iPET HOT 1
- Stuck at 'There are 0 Examples for Label [my_label]' During iPETs Example Selection for Next Generation
- There is no softmax
- Training Time Issue HOT 4
- GenPET commands with GPT-2 HOT 2
- RuntimeError on eval method HOT 2
- Token indices sequence length is longer than the specified maximum sequence length for this model HOT 2
- PET and iPET parameters
- Random seed parameter for iterations
- Data format for few-shot text classification
- Roberta-large using BPE tokenizer generates multi tokens. HOT 6
- API Usage
- How much test data do you use in your experiments?
- How to training PET model uses xlm-roberta with byte-level Byte-Pair-Encoding?
- How to reproduce results of the paper? HOT 1
- Clarification on how to interpret PET's results HOT 2
- A question about “Automatically Identifying Words That Can Serve as Labels for Few-Shot Text Classification”
- RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)` HOT 3
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 pet.