Comments (23)
Hello @eahogue , how much time approximately did it take for you to train the model (targetid)?
I have started training the model but its taking forever to train it. My specs are as follows and I am concerned that it will take a lot of time to train the models:
MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
Processor - 2 GHz Quad-Core Intel Core i5
Graphics - Intel Iris Plus Graphics 1536 MB
RAM - 16 GB 3733 MHz LPDDR4X
Also, if possible, can someone upload the trained models for targetid, frameid and argid, so that maybe others could use them as pre-trained models? Thanks!:)Hello, I can try loading my trained models for targetid, frameid. But I haven't tested them yet as the model for argid is still learning (4th day). And they will also have less accuracy than stated in this table https://github.com/swabhs/open-sesame#pre-trained-models .
It would be better to share them after checking the work and additional training.Can you still upload the trained models for targetid and frameid? I dont think there would be much of a difference between the accuracy of your models and the pretrained ones as they are trained on the same fn data. :)
https://drive.google.com/file/d/1BMQJXbjhPItmdH8ZWRlqD3vKU16TAJrr/view?usp=sharing
Yes of course. This archive contains all 3 models.
Best dev f1:
- argid 0.5912
- targetid 0.7892
- frameid 0.8930
I will still try to retrain them later.
from open-sesame.
I struggled to get sesame working due to this issue, so instead trained a T5 transformer model using the open-sesame data/splits. It gets pretty comparable results in trigger ID and frame ID, but does better in arg ID. Sharing here in case it's useful to others: https://github.com/chanind/frame-semantic-transformer
from open-sesame.
I had the same issue ( frameid haltingwith a NaN error), but I got it solved by using Dynet v. 2.1. You could do this with 'pip install dynet==2.1' command line.
from open-sesame.
I am also working on the same problem. I haven't totally solved the problem but I do solve one bug in the preprocessing script which is related.
In "preprocess.py", line 79, remove the encode function.
outf.write(str(token.encode('utf-8')) + "\t") # The encode shouldn't appear here in the python3 version
outf.write(str(token) + "\t") # FORM = 1 # The correct one
When using encode function here, the output of the training data would be
1 b'Over' _ Over in IN 1 _ _ _ _ _ _ _ O
, where the prefix b indicates that it is a byte. When parsing training data to build the vocabulary (VOCDICT), these words are treated as a whole (b'Over'). The vocabulary size is then larger than the original one.
After solving this, the vocabulary size doesn't match still. Now it is 400572 but the provided model has 400574 words.
Waiting for someone else to dig further into the issue. Thanks.
from open-sesame.
Thanks for that tip! Still hoping someone has insight into the cause of this problem. I'd be willing to try fixing it.
from open-sesame.
I also faced a completely similar problem.
All the past problems with similar errors did not help.
Thanks @appleternity for that tip.
from open-sesame.
@Brit7777 Wow, that worked! Thank you!
Hopefully with our own trained models, the other problem of vocab size will be solved as well. I will know for sure by tomorrow, probably. :)
from open-sesame.
@eahogue I'm training my model rn as well haha. Training argid takes forever....Please let me know if the trained model works without error!
from open-sesame.
@eahogue @Brit7777 @Vlad116
Hi, Everyone I respect.
Even though I installed Dynet v.2.1
, I have the same problem.
root@935fe2bce6cc:~/bert_models/open-sesame# pip show nltk
Name: nltk
Version: 3.5
Summary: Natural Language Toolkit
Home-page: http://nltk.org/
Author: Steven Bird
Author-email: [email protected]
License: Apache License, Version 2.0
Location: /opt/conda/lib/python3.7/site-packages
Requires: tqdm, joblib, regex, click
Required-by:
root@935fe2bce6cc:~/bert_modelsopen-sesame# pip show dynet
Name: dyNET
Version: 2.1
Summary: The Dynamic Neural Network Toolkit
Home-page: https://github.com/clab/dynet
Author: Graham Neubig
Author-email: [email protected]
License: Apache 2.0
Location: /opt/conda/lib/python3.7/site-packages
Requires: numpy, cython
Required-by:
root@935fe2bce6cc:~/bert_models/open-sesame# python -m sesame.targetid --mode predict --model_name fn1.7-pretrained-targetid
[dynet] random seed: 715363830
[dynet] allocating memory: 512MB
[dynet] memory allocation done.
ARGID_LR: 0.0005
DATA_DIRECTORY: data/
DEBUG_MODE: False
EMBEDDINGS_FILE: data/glove.6B.100d.txt
VERSION: 1.7
_____________________
COMMAND: /root/bert_models/open-sesame/sesame/targetid.py --mode predict --model_name fn1.7-pretrained-targetid --raw_input data/input/atomic-emotion.txt
MODEL FOR TEST / PREDICTION: logs/fn1.7-pretrained-targetid/best-targetid-1.7-model
PARSING MODE: predict
_____________________
Reading data/open_sesame_v1_data/fn1.7/fn1.7.fulltext.train.syntaxnet.conll ...
591032it [00:06, 96443.46it/s]
# examples in data/open_sesame_v1_data/fn1.7/fn1.7.fulltext.train.syntaxnet.conll : 19391 in 3413 sents
# examples with missing arguments : 526
Combined 19391 instances in data into 3413 instances.
Reading the lexical unit index file: data/fndata-1.7/luIndex.xml
# unique targets = 9421
# total targets = 13572
# targets with multiple LUs = 4151
# max LUs per target = 5
Reading pretrained embeddings from data/glove.6B.100d.txt ...
PARSER SETTINGS (see logs/fn1.7-pretrained-targetid/configuration.json)
_____________________
DEV_EVAL_EPOCH_FREQUENCY: 3
DROPOUT_RATE: 0.01
EVAL_AFTER_EVERY_EPOCHS: 100
HIDDEN_DIM: 100
LEMMA_DIM: 100
LSTM_DEPTH: 2
LSTM_DIM: 100
LSTM_INPUT_DIM: 100
NUM_EPOCHS: 100
PATIENCE: 25
POS_DIM: 100
PRETRAINED_EMBEDDING_DIM: 100
TOKEN_DIM: 100
TRAIN: data/neural/fn1.7/fn1.7.fulltext.train.syntaxnet.conll
UNK_PROB: 0.1
USE_DROPOUT: True
# Tokens = 410050
Unseen in dev/test = 550
Unlearnt in dev/test = 400550
# POS tags = 45
Unseen in dev/test = 0
Unlearnt in dev/test = 1
# Lemmas = 9349
Unseen in dev/test = 5495
Unlearnt in dev/test = 5496
_____________________
Reading model from logs/fn1.7-pretrained-targetid/best-targetid-1.7-model ...
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/conda/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/bert_models/open-sesame/sesame/targetid.py", line 459, in <module>
model.populate(model_file_name)
File "_dynet.pyx", line 1461, in _dynet.ParameterCollection.populate
File "_dynet.pyx", line 1516, in _dynet.ParameterCollection.populate_from_textfile
RuntimeError: Dimensions of lookup parameter /_0 lookup up from file ({100,400574}) do not match parameters to be populated ({100,410050})
Is there anything I miss?
I’d be glad if you could help me.
Thanks.
from open-sesame.
from open-sesame.
I understood the current situation accurately.
Thanks for your kind reply!
...
> There are actually two problems here. One is the vocab number which appears when you try to make predictions from the pre-trained models. I assume this has something to do with one of the models being corrupted or some number not matching up somewhere. No one seems to know. Switching to Dynet 2.1 doesn't affect that. What it does is make it possible to train your own models. If you try training with the recommended version of dynet, you get NaN errors. Using the newer version does fix that problem. The upshot being, if you want to use open-sesame, you have to train your own models first. Alan > […](#) > On Sun, Mar 21, 2021 at 10:11 PM fairy-of-9 ***@***.***> wrote: @eahogue @Brit7777 @Vlad116 Hi, Everyone I respect. Even though I installed Dynet v.2.1, I have the same problem. ***@***.***:~/bert_models/open-sesame# pip show nltk Name: nltk Version: 3.5 Summary: Natural Language Toolkit Home-page: http://nltk.org/ Author: Steven Bird Author-email: ***@***.*** License: Apache License, Version 2.0 Location: /opt/conda/lib/python3.7/site-packages Requires: tqdm, joblib, regex, click Required-by: ***@***.***:~/bert_modelsopen-sesame# pip show dynet Name: dyNET Version: 2.1 Summary: The Dynamic Neural Network Toolkit Home-page: https://github.com/clab/dynet Author: Graham Neubig Author-email: ***@***.*** License: Apache 2.0 Location: /opt/conda/lib/python3.7/site-packages Requires: numpy, cython Required-by: ***@***.***:~/bert_models/minimal-BERT/open-sesame# python -m sesame.targetid --mode predict --model_name fn1.7-pretrained-targetid --raw_input data/input/atomic-emotion.txt [dynet] random seed: 715363830 [dynet] allocating memory: 512MB [dynet] memory allocation done. ARGID_LR: 0.0005 DATA_DIRECTORY: data/ DEBUG_MODE: False EMBEDDINGS_FILE: data/glove.6B.100d.txt VERSION: 1.7 _____________________ COMMAND: /root/bert_models/minimal-BERT/open-sesame/sesame/targetid.py --mode predict --model_name fn1.7-pretrained-targetid --raw_input data/input/atomic-emotion.txt MODEL FOR TEST / PREDICTION: logs/fn1.7-pretrained-targetid/best-targetid-1.7-model PARSING MODE: predict _____________________ Reading data/open_sesame_v1_data/fn1.7/fn1.7.fulltext.train.syntaxnet.conll ... 591032it [00:06, 96443.46it/s] # examples in data/open_sesame_v1_data/fn1.7/fn1.7.fulltext.train.syntaxnet.conll : 19391 in 3413 sents # examples with missing arguments : 526 Combined 19391 instances in data into 3413 instances. Reading the lexical unit index file: data/fndata-1.7/luIndex.xml # unique targets = 9421 # total targets = 13572 # targets with multiple LUs = 4151 # max LUs per target = 5 Reading pretrained embeddings from data/glove.6B.100d.txt ... PARSER SETTINGS (see logs/fn1.7-pretrained-targetid/configuration.json) _____________________ DEV_EVAL_EPOCH_FREQUENCY: 3 DROPOUT_RATE: 0.01 EVAL_AFTER_EVERY_EPOCHS: 100 HIDDEN_DIM: 100 LEMMA_DIM: 100 LSTM_DEPTH: 2 LSTM_DIM: 100 LSTM_INPUT_DIM: 100 NUM_EPOCHS: 100 PATIENCE: 25 POS_DIM: 100 PRETRAINED_EMBEDDING_DIM: 100 TOKEN_DIM: 100 TRAIN: data/neural/fn1.7/fn1.7.fulltext.train.syntaxnet.conll UNK_PROB: 0.1 USE_DROPOUT: True # Tokens = 410050 Unseen in dev/test = 550 Unlearnt in dev/test = 400550 # POS tags = 45 Unseen in dev/test = 0 Unlearnt in dev/test = 1 # Lemmas = 9349 Unseen in dev/test = 5495 Unlearnt in dev/test = 5496 _____________________ Reading model from logs/fn1.7-pretrained-targetid/best-targetid-1.7-model ... Traceback (most recent call last): File "/opt/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/opt/conda/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/bert_models/minimal-BERT/open-sesame/sesame/targetid.py", line 459, in model.populate(model_file_name) File "_dynet.pyx", line 1461, in _dynet.ParameterCollection.populate File "_dynet.pyx", line 1516, in _dynet.ParameterCollection.populate_from_textfile RuntimeError: Dimensions of lookup parameter /_0 lookup up from file ({100,400574}) do not match parameters to be populated ({100,410050}) Is there anything I miss? I’d be glad if you could help me. Thanks. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <[#61 (comment)](https://github.com//issues/61#issuecomment-803764959)>, or unsubscribe .from open-sesame.
Hello @eahogue , how much time approximately did it take for you to train the model (targetid)?
I have started training the model but its taking forever to train it. My specs are as follows and I am concerned that it will take a lot of time to train the models:
MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
Processor - 2 GHz Quad-Core Intel Core i5
Graphics - Intel Iris Plus Graphics 1536 MB
RAM - 16 GB 3733 MHz LPDDR4X
Also, if possible, can someone upload the trained models for targetid, frameid and argid, so that maybe others could use them as pre-trained models? Thanks!:)
from open-sesame.
Hello @eahogue , how much time approximately did it take for you to train the model (targetid)?
I have started training the model but its taking forever to train it. My specs are as follows and I am concerned that it will take a lot of time to train the models:
MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
Processor - 2 GHz Quad-Core Intel Core i5
Graphics - Intel Iris Plus Graphics 1536 MB
RAM - 16 GB 3733 MHz LPDDR4XAlso, if possible, can someone upload the trained models for targetid, frameid and argid, so that maybe others could use them as pre-trained models? Thanks!:)
Hello, I can try loading my trained models for targetid, frameid. But I haven't tested them yet as the model for argid is still learning (4th day). And they will also have less accuracy than stated in this table https://github.com/swabhs/open-sesame#pre-trained-models .
It would be better to share them after checking the work and additional training.
from open-sesame.
Hello @eahogue , how much time approximately did it take for you to train the model (targetid)?
I have started training the model but its taking forever to train it. My specs are as follows and I am concerned that it will take a lot of time to train the models:
MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
Processor - 2 GHz Quad-Core Intel Core i5
Graphics - Intel Iris Plus Graphics 1536 MB
RAM - 16 GB 3733 MHz LPDDR4X
Also, if possible, can someone upload the trained models for targetid, frameid and argid, so that maybe others could use them as pre-trained models? Thanks!:)Hello, I can try loading my trained models for targetid, frameid. But I haven't tested them yet as the model for argid is still learning (4th day). And they will also have less accuracy than stated in this table https://github.com/swabhs/open-sesame#pre-trained-models .
It would be better to share them after checking the work and additional training.
Can you still upload the trained models for targetid and frameid? I dont think there would be much of a difference between the accuracy of your models and the pretrained ones as they are trained on the same fn data. :)
from open-sesame.
https://drive.google.com/file/d/1BMQJXbjhPItmdH8ZWRlqD3vKU16TAJrr/view?usp=sharing
Yes of course. This archive contains all 3 models.Best dev f1:
- argid 0.5912
- targetid 0.7892
- frameid 0.8930
I will still try to retrain them later.
Thanks a lot for this. But I am still getting the same error RuntimeError: Dimensions of lookup parameter /_0 lookup up from file ({100,410050}) do not match parameters to be populated ({100,400573})
My configuration is:
- Python 3.8.5
- DyNet 2.1.2
- nltk 3.5
- glove embeddings glove.6B.100d.txt
- fn1.7
Are these same as yours or have you used some other configuration to train the models?
from open-sesame.
https://drive.google.com/file/d/1BMQJXbjhPItmdH8ZWRlqD3vKU16TAJrr/view?usp=sharing
Yes of course. This archive contains all 3 models.
Best dev f1:
- argid 0.5912
- targetid 0.7892
- frameid 0.8930
I will still try to retrain them later.
Thanks a lot for this. But I am still getting the same error
RuntimeError: Dimensions of lookup parameter /_0 lookup up from file ({100,410050}) do not match parameters to be populated ({100,400573})
My configuration is:
- Python 3.8.5
- DyNet 2.1.2
- nltk 3.5
- glove embeddings glove.6B.100d.txt
- fn1.7
Are these same as yours or have you used some other configuration to train the models?
Try dyNET == 2.1 as mentioned earlier.
My configuration is like this:
- Python 3.7.9
- nltk == 3.5
- dyNET == 2.1
- glove embeddings glove.6B.100d.txt
- fn1.7
from open-sesame.
Try dyNET == 2.1 as mentioned earlier.
My configuration is like this:
- Python 3.7.9
- nltk == 3.5
- dyNET == 2.1
- glove embeddings glove.6B.100d.txt
- fn1.7
Thanks for this. Surprisingly, it was still not working on my Mac configuration. Tested on Windows with the same configuration and it works! Will deep dive into it and see why it's not working on MacOS...
from open-sesame.
@Brit7777 Wow, that worked! Thank you!
Hopefully with our own trained models, the other problem of vocab size will be solved as well. I will know for sure by tomorrow, probably. :)
Hi, did you make any changes to the code you successfully ran except for the version of dynet?
from open-sesame.
@Vlad116 hi, sorry to bother. I am trying to use your trained model by running following command:
python -m sesame.targetid --mode predict --model_name fn1.7-targetid --raw_input input.txt
but I met the following problem:
RuntimeError: Dimensions of lookup parameter /_0 lookup up from file ({100,410050}) do not match parameters to be populated ({100,400000})
Is there anything I miss?
My configuration is like:
python 3.6.12
nltk==3.5
dyNET == 2.1
glove embeddings glove.6B.100d.txt downloaded from here
Could you please upload your glove.6B.100d.txt
?
I’d be glad if you could help me.
Thanks.
from open-sesame.
@Vlad116 hi, sorry to bother. I am trying to use your trained model by running following command:
python -m sesame.targetid --mode predict --model_name fn1.7-targetid --raw_input input.txt
but I met the following problem:
RuntimeError: Dimensions of lookup parameter /_0 lookup up from file ({100,410050}) do not match parameters to be populated ({100,400000})
Is there anything I miss?My configuration is like:
python 3.6.12
nltk==3.5
dyNET == 2.1
glove embeddings glove.6B.100d.txt downloaded from hereCould you please upload your
glove.6B.100d.txt
?
I’d be glad if you could help me.
Thanks.
@Alexia1994 Hi, could there be a problem in the Python version? It seems there was this file
https://drive.google.com/file/d/1V__v9Lt4Fb_rwZD9ogYXFjaoWrLNrPb9/view?usp=sharing
from open-sesame.
@Alexia1994 hi, I also have the same problem. Have you solved it yet?
from open-sesame.
+up same problem here. Trying to avoid retraining since it is taking a lonnng time
from open-sesame.
@chanind very nice work! Thanks for sharing. I will try with your repo.
from open-sesame.
Related Issues (20)
- output description HOT 1
- Dimensionality Mismatch While Trying to Run Prediction HOT 7
- I just made the necessary modifications to work with Python 3 and produce the output in Json format. HOT 1
- get postags and lemmas of sentences all zero when running prediction
- FrameID Results include Gold Arguments
- Error While Training: no attribute '__reduce_cython__'
- Got an Error while Running a Basic Prediction Task HOT 1
- Enable GPU HOT 1
- install error
- Question on the reported results. HOT 1
- 'WindowsPath' object has no attribute 'read'
- KeyError while training FrameID and ArgID
- The link to GloVe embeddings is not valid
- Glove word embedding links returns 404 HOT 2
- TypeError: Argument 'init' has incorrect type (expected _dynet.PyInitializer, got str) HOT 1
- Any suggestions/pipeline process for large text files?
- Process aborts abruptly with "Killed" message
- Using open-sesame framework for a new language? HOT 1
- Is open-sesame still supported? HOT 1
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 open-sesame.