-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Model for Inference #11
Comments
use -mode test -test_from PT_FILE |
Hi ! I am also trying to use the model for inference but when I use the above mode with a singular checkpoint. Using this command I get this error |
@d1sharma -test_from PT_FILE, PT_FILE should be the model file not the bert_data file |
Oh. Got it. So I need both -model_path and -test_from to point to the same model ? |
with test mode model_path is not required |
Thank you so much! Just last question, when I try
I still get an error with missing the test |
Try with same command but replace :
by
|
hi , when I run the code as follow order I meet a mistake, so when you have some free time , I hope you can give me some help,thanks.looking forward to your reply. order: errors: Traceback (most recent call last): |
Encountering same error as @hi-wangyan EDIT: I noticed I have not installed ROUGE, but because service is currently unavailable. Apart from that, do we need to create a settings file for it? |
So even is not available on the main website, is possible to get a working copy from: |
hi, but I have install the package of pyrouge successful. Now I can not find where exist some errors: my first order is : my second order is : but now I don't know whether the run order is right |
Hello,
with pre-trained weights model_step_148000.pt , an error occured File "train.py", line 135, in |
ok,Thank you very much!
…---Original---
From: "fatmalearning"<notifications@github.com>
Date: Tue, Oct 15, 2019 18:02 PM
To: "nlpyang/PreSumm"<PreSumm@noreply.github.com>;
Cc: "Mention"<mention@noreply.github.com>;"wangyan"<1208554118@qq.com>;
Subject: Re: [nlpyang/PreSumm] Using Model for Inference (#11)
Try with same command but replace :
-bert_data_path ../bert_data/
by
-bert_data_path ../bert_data/cnndm
when I did like you this error displayed from me
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/My Drive/Abstractive/PreSumm/bert_data/cnndm.test.pt'
my commany is
!python '/content/drive/My Drive/Abstractive/PreSumm/src/train.py' -task abs -mode test -test_from "/content/drive/My Drive/Abstractive/PreSumm/models/model_step_148000.pt" -batch_size 3000 -test_batch_size 500 -bert_data_path "/content/drive/My Drive/Abstractive/PreSumm/bert_data/cnndm" -log_file "/content/drive/My Drive/Abstractive/PreSumm/logs/val_abs_bert_cnndm" -model_path "/content/drive/My Drive/Abstractive/PreSumm-master/models/" -sep_optim true -use_interval true -visible_gpus 1 -max_pos 512 -max_length 200 -alpha 0.95 -min_length 50 -result_path "/content/drive/My Drive/Abstractive/PreSumm-master/results/abs_bert_cnndm" -temp_dir "/content/drive/My Drive/Abstractive/PreSumm/temp/" -visible_gpus True
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I used this command from my google colab
|
actually i printed ex
'labels': [0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'src_txt': ['a university of iowa student has died nearly three months after a fall in rome in a suspected robbery attack in rome .', 'andrew mogni , 20 , from glen ellyn , illinois , had only just arrived for a semester program in italy when the incident happened in january .', 'he was flown back to chicago via air ambulance on march 20 , but he died on sunday .', 'andrew mogni , 20 , from glen ellyn , illinois , a university of iowa student has died nearly three months after a fall in rome in a suspected robbery', 'he was taken to a medical facility in the chicago area , close to his family home in glen ellyn .', "he died on sunday at northwestern memorial hospital - medical examiner 's office spokesman frank shuftan says a cause of death wo n't be released until monday at the earliest .", 'initial police reports indicated the fall was an accident but authorities are investigating the possibility that mogni was robbed .', "on sunday , his cousin abby wrote online : 'tgt_txt': 'andrew mogni , 20 , from glen ellyn , illinois , had only just arrived for a semester program when the incident happened in january it is not include tgt only , could you help me ? |
How did you preprocess the data ? |
use the already processed data
…---Original---
From: "Cola"<notifications@github.com>
Date: Wed, Oct 16, 2019 07:36 AM
To: "nlpyang/PreSumm"<PreSumm@noreply.github.com>;
Cc: "Mention"<mention@noreply.github.com>;"wangyan"<1208554118@qq.com>;
Subject: Re: [nlpyang/PreSumm] Using Model for Inference (#11)
How did you preprocess the data ?
Did you do it by yourself or use the already processed data ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
It's weird because when I download the data, I have Try to download again the data and check if |
Sorry @hi-wangyan I thought you are someone else ^^ Your error is about pyrouge. To check if your pyrouge installation is working :
If some tests are not passing, I advise you to reinstall pyrouge by following this tutorial. |
It doesn't matter, I can't do this task now, the code can't run, the server isn't working yet
…---Original---
From: "Cola"<notifications@github.com>
Date: Wed, Oct 16, 2019 09:39 AM
To: "nlpyang/PreSumm"<PreSumm@noreply.github.com>;
Cc: "Mention"<mention@noreply.github.com>;"wangyan"<1208554118@qq.com>;
Subject: Re: [nlpyang/PreSumm] Using Model for Inference (#11)
Sorry @hi-wangyan I thought you are someone else ^^
Your error is about pyrouge.
To check if your pyrouge installation is working :
python -m pyrouge.test
If some tests are not passing, I advise you to reinstall pyrouge by following this tutorial
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I used the already processed data data from the project PreSumm for CNN/Dailymail now with this command
could you help me ? |
replace :
…-bert_data_path ../bert_data/
by
-bert_data_path ../bert_data/cnndm
---Original---
From: "fatmalearning"<notifications@github.com>
Date: Wed, Oct 16, 2019 19:42 PM
To: "nlpyang/PreSumm"<PreSumm@noreply.github.com>;
Cc: "Mention"<mention@noreply.github.com>;"wangyan"<1208554118@qq.com>;
Subject: Re: [nlpyang/PreSumm] Using Model for Inference (#11)
How did you preprocess the data ?
Did you do it by yourself or use the already processed data ?
I used the already processed data data from the project PreSumm for CNN/Dailymail now with this command
!python '/content/drive/My Drive/Abstractive/PreSumm/src/train.py' -task abs -mode test -test_from "/content/drive/My Drive/Abstractive/PreSumm/models/model_step_148000.pt" -batch_size 3000 -test_batch_size 500 -bert_data_path "/content/drive/My Drive/Abstractive/PreSumm/bert_data/bert_data_cnndm_final/" -log_file "/content/drive/My Drive/Abstractive/PreSumm/logs/val_abs_bert_cnndm" -model_path "/content/drive/My Drive/Abstractive/PreSumm-master/models/" -sep_optim true -use_interval true -visible_gpus 1 -max_pos 512 -max_length 200 -alpha 0.95 -min_length 50 -result_path "/content/drive/My Drive/Abstractive/PreSumm/logs/abs_bert_cnndm" -temp_dir "/content/drive/My Drive/Abstractive/PreSumm/temp/" -visible_gpus True
Now it show this error
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/My Drive/Abstractive/PreSumm/bert_data/bert_data_cnndm_final/.test.pt'
could you help me ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
thanks @hi-wangyan it covered this error but after i did this step . it shows another error |
thanks , the problem was solved by downgrade the pytorch version to 1.1 instead of 1.2 or 1.3 |
hey !python train.py -task ext -mode train -bert_data_path "/content/drive/My Drive/BERTSUMEXT/bert_data/cnndm" -ext_dropout 0.1 -model_path "/content/drive/My Drive/BERTSUMEXT/models" -lr 2e-3 -visible_gpus 0 -report_every 50 -save_checkpoint_steps 1000 -batch_size 3000 -train_steps 50000 -accum_count 2 -log_file ../logs/ext_bert_cnndm -use_interval true -warmup_steps 10000 -max_pos 512 but It shows this error [2019-11-20 20:10:35,503 INFO] * number of parameters: 120512513 |
I have the same problem! |
Had the same error when I used the data downloaded from the BertSum README (https://github.com/nlpyang/BertSum). Changed it with the one from PreSumm and I no longer have the error. Hope it helps! |
@LauraGheoldan is right. Or you can process the data yourself (follow the 5 steps of Option2) |
Hi; you may need to make the .log file in the directory yourself.
…On Mon, May 11, 2020 at 3:34 AM dhouhaomri ***@***.***> wrote:
Hi, i tried this command for mode training:
python /users/omri/workspace/Trainbert/PreSumm/src/train.py -task ext
-mode train -bert_data_path
/users/omri/workspace/Trainbert/PreSumm/bert_data -ext_dropout 0.1
-model_path /users/omri/workspace/Trainbert/PreSumm/models -lr 2e-3
-visible_gpus -1 -report_every 50 -save_checkpoint_steps 1000 -batch_size
3000 -train_steps 50000 -accum_count 2 -log_file
/workspace/Trainbert/PreSumm/logs/ext_bert_cnndm -use_interval true
-warmup_steps 10000 -max_pos 512
but when i run it the error is that there is no "ext_bert_cnndm" log_file.
Where i can find logs files beause this directory is empty.
Any help please?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AISPT52K4ZOGP4EI5HNGM33RQ62AFANCNFSM4IQQTNTA>
.
|
Hi, thanks for your work here. How do we use the pretrained models for inference (summarization) on article text? I have downloaded the trained cnndm model (.pt), but how do I load this in a python program to use? Thanks!
The text was updated successfully, but these errors were encountered: