You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am just running the command given in the readme file to train the model on django dataset.
. train.sh django
I get the below error. I haven't able to able to fix this. Is the something you faced?
The code runs perfectly for the "hs" dataset.
Traceback (most recent call last):
File "code_gen.py", line 163, in <module>
learner.train()
File "/users/PAS1351/osu9907/NL2code/learner.py", line 111, in train
bleu, accuracy = evaluation.evaluate_decode_results(self.val_data, decode_results, verbose=False)
File "/users/PAS1351/osu9907/NL2code/evaluation.py", line 170, in evaluate_decode_results
bleu_score = sentence_bleu([refer_tokens_for_bleu], pred_tokens_for_bleu, weights=ngram_weights, smoothing_function=sm.method3)
File "/users/PAS1351/osu9907/envs/nl2code/lib/python2.7/site-packages/nltk/translate/bleu_score.py", line 79, in sentence_bleu
return corpus_bleu([references], [hypothesis], weights, smoothing_function)
File "/users/PAS1351/osu9907/envs/nl2code/lib/python2.7/site-packages/nltk/translate/bleu_score.py", line 180, in corpus_bleu
return bp * math.exp(math.fsum(s))
File "/users/PAS1351/osu9907/envs/nl2code/lib/python2.7/site-packages/nltk/translate/bleu_score.py", line 178, in <genexpr>
if p_i.numerator != 0)
AttributeError: 'float' object has no attribute 'numerator'
The text was updated successfully, but these errors were encountered:
I am just running the command given in the readme file to train the model on django dataset.
I get the below error. I haven't able to able to fix this. Is the something you faced?
The code runs perfectly for the "hs" dataset.
The text was updated successfully, but these errors were encountered: