Comments (10)
Hi, could you please provide more details about this issue? e.g., the config file you run, the environments, and screenshots. These will help us find the problem, thanks.
from adaseq.
Please see below for the config file (only the source and target emb files are changed according to the instruction). I'm not sure what information I should provide regarding the environment (except pip freeze above) and screenshots? Thanks.
config file:
experiment:
exp_dir: experiments/
exp_name: ufet
seed: 17
task: entity-typing
dataset:
data_file:
train: 'https://www.modelscope.cn/api/v1/datasets/izhx404/ufet/repo/files?Revision=master&FilePath=train.json'
valid: 'https://www.modelscope.cn/api/v1/datasets/izhx404/ufet/repo/files?Revision=master&FilePath=dev.json'
test: 'https://www.modelscope.cn/api/v1/datasets/izhx404/ufet/repo/files?Revision=master&FilePath=test.json'
tokenizer: blank
lower: true
labels: 'https://www.modelscope.cn/api/v1/datasets/izhx404/ufet/repo/files?Revision=master&FilePath=labels.txt'
preprocessor:
type: multilabel-concat-typing-preprocessor
model_dir: roberta-large
max_length: 150
data_collator: MultiLabelConcatTypingDataCollatorWithPadding
model:
type: multilabel-concat-typing-model
embedder:
model_name_or_path: roberta-large
drop_special_tokens: false
dropout: 0
decoder:
type: pairwise-crf
label_emb_type: glove
label_emb_dim: 300
source_emb_file_path: None
target_emb_dir: /home/averie/name-entity-recognition/experiments/adaseq/glove_embeds # TODO
target_emb_name: glove.300.emb
pairwise_factor: 70
mfvi_iteration: 4
two_potential: false
sign_trick: true
loss_function: WBCE
pos_weight: 4
train:
max_epochs: 30
dataloader:
batch_size_per_gpu: 4
optimizer:
type: AdamW
lr: 2.0e-5
lr_scheduler:
type: cosine
warmup_rate: 0.1 # when choose concat typing model, default to use cosine_linear_with_warmup
options:
by_epoch: false
hooks:
- type: "CheckpointHook"
interval: 100
- type: "BestCkptSaverHook"
save_file_name: "best_model.pt"
evaluation:
dataloader:
batch_size_per_gpu: 32
metrics: typing-metric
from adaseq.
could you successfully run the default npcrf example?
from adaseq.
how do i run the default example? it requires PATH_TO_DIR to be replaced, which is what I did.
from adaseq.
decoder:
type: pairwise-crf
label_emb_type: glove
label_emb_dim: 300
source_emb_file_path: ${PATH_TO_DIR}/glove.6B.300d.txt
target_emb_dir: ${PATH_TO_DIR} # TODO
target_emb_name: glove.300.emb
pairwise_factor: 70
mfvi_iteration: 4
two_potential: false
sign_trick: true
It seems that your configuration is incorrect, the above shows the default configuration. The glove path can be downloaded from the official stanford website: https://nlp.stanford.edu/data/glove.6B.zip.
The source_emb_file_path
should be the absolute path to for example the glove.6B.300d.txt, and the target_emb_dir
, is the directory that you want to store the label embedding matrix named with target_emb_name
.
In other word, the label embedding is preprocessed from ${YOUR_SRC_EMB_DIR}/glove.6B.300d.txt, and saved to ${YOUR_TGT_EMB_SAVE_DIR}/glove.300.emb
from adaseq.
thank you for your answer. according to the readme in the NPCRF directory:
"NPCRF requires static label embeddings, the preprocessed label embeddings (from GloVe for EN, Tencent for ZH) can be downloaded here: UFET, CFET, and you can place them in yoru folder and run the following config: (you need to reset your target_emb_dir in the config). Or you can provide the path of the glove embedding file (e.g., /path/to/your/glove.6B.300d.txt) and the code will generate label embedding for you."
so i cannot use the glove.300.emb given in this description?
from adaseq.
Could you please give a screenshot of the error message?
And, can you successfully run the model when you create embedding from the glove source?
from adaseq.
I just tried the glove source, it resulted in the same error (see screenshot)
from adaseq.
oops, it seems that the bug is caused by the latest update of adaseq in the typing metric. No problem occurs in the training and loading label embeddings, a quick fix could be downgrading the adaseq to 0.6.2 and modelscope to 1.4.2.
We will fix the bug later.
from adaseq.
thanks for the reply. i did pip install adaseq==0.6.2
and pip install modelscope==1.4.2
but still getting the same error. am I missing something?
from adaseq.
Related Issues (20)
- [Question] Where is the MoRe code? HOT 1
- NotImplementedError HOT 2
- [Feature] pipleline NER返回结果问题 HOT 7
- [Question] CUDA out of memory HOT 1
- 新增案例文档
- [Question] Can not import BERT model because config lacks `Task` field
- [Question] About the search engine
- FileNotFoundError of try HOT 2
- [Question] ner任务的evaluate标准是怎样的f1?evaluate的代码在哪里查看?
- [Question] 运行twitter-17-txt.yaml和twitter-17-img.yaml出错
- [Question] i can't find the TBD dataset
- [Question]How to solve [datasets.builder.DatasetGenerationError: An error occurred while generating the dataset] HOT 7
- 数据集格式[Question]
- [Question] ValueError: unknown url type: 'adaseq-0.6.6-py3-none-any.whl.metadata' HOT 2
- [Question] 大佬你好,请问可以上传一下论文Improving Low-resource Named Entity Recognition with Graph Propagated Data Augmentation的代码吗? HOT 1
- CRF训练loss不稳定 HOT 1
- [Question] Error loading inference after model fine-tuning 模型微调后加载时出错 HOT 1
- ncbi and bc5cd
- [Question]
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 adaseq.