Skip to content
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

METEOR in eval.py #4

Closed
dara1822 opened this issue Jun 14, 2019 · 4 comments
Closed

METEOR in eval.py #4

dara1822 opened this issue Jun 14, 2019 · 4 comments

Comments

@dara1822
Copy link

dara1822 commented Jun 14, 2019

Hi! I am currently using this code (and it's really great by the way) and I started training the abstract model and there was a KeyError: 'METEOR' in the eval.py file. To get rid of the error, I commented out line 72 print (‘METEOR:\t’, final_scores [‘METEOR’]) in the eval.py file, but I was just wondering if METEOR is important and how to fix the training code and implement METEOR?

@EagleW
Copy link
Owner

EagleW commented Jun 15, 2019

@dara1822 I have fixed the bug, it is not important for training. Thank you very much for your suggestion.

@EagleW EagleW closed this as completed Jun 15, 2019
@demonlj
Copy link

demonlj commented Jul 8, 2019

got similar error
system: win8.1 + cuda10.1 + python 3.7 + pytorch1.1
C:\greenSoft\PaperRobot-master\New paper writing>python train.py --data_path dat a/pubmed_abstract --model_dp abstract_model/ --batch_size=10

`Model location: abstract_model/memory,lower=False,freq=5,word_dim=128,h=8,hop=3,
input_dropout_p=0.2,layer_dropout=0.2,gpu=True,batch_size=10,max_len=150,lr_meth
od=adam,lr_rate=0.001
Model parameters:
lower=False
freq=5
word_dim=128
h=8
hop=3
pre_emb=
input_dropout_p=0.2
layer_dropout=0.2
gpu=True
batch_size=10
max_len=150
lr_method=adam
lr_rate=0.001
data_path=data/pubmed_abstract
Found 25133 unique words (16508545 in total)
22811 / 2095 pairs in train / dev.
train batches 2282

Epoch 0/99
2281 batches processed. current batch loss: 6.061568
Finished epoch 0: Train Avg NLLLoss: 6.4136
Traceback (most recent call last):
File "train.py", line 261, in
eval_f = Evaluate()
File "C:\greenSoft\PaperRobot-master\New paper writing\eval.py", line 15, in _
init_
(Meteor(), "METEOR"),
File "C:\greenSoft\PaperRobot-master\New paper writing\pycocoevalcap\meteor\me
teor.py", line 20, in init
stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, buf
size=1)
File "C:\Users\MyPC\AppData\Local\Programs\Python\Python37\lib\subprocess.py",
line 775, in init
restore_signals, start_new_session)
File "C:\Users\MyPC\AppData\Local\Programs\Python\Python37\lib\subprocess.py",
line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2]。
Exception ignored in: <function Meteor.del at 0x0000000FECFBDD90>
Traceback (most recent call last):
File "C:\greenSoft\PaperRobot-master\New paper writing\pycocoevalcap\meteor\me
teor.py", line 59, in del
self.lock.acquire()
AttributeError: 'Meteor' object has no attribute 'lock' `

Thought the training already finished, the METEOR error does not matter?

@EagleW
Copy link
Owner

EagleW commented Jul 9, 2019 via email

@EagleW
Copy link
Owner

EagleW commented Jul 9, 2019

I have commented out meteor in the current version, you can try to pull it again, because we don't use it in training @demonlj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants