agemagician / CodeTrans

Pretrained Language Models for Source code
MIT License
247 stars 32 forks source link

summary model outputs interrogative sentence? #8

Closed estella98 closed 2 years ago

estella98 commented 2 years ago

Hi, When playing with the example notebook provided in the following link: https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/source%20code%20summarization/python/base_model.ipynb I noticed the summary is an interrogative sentence. image

But it seems like when the example was first created, the expected output should be a declarative sentence as follow: image

Has the model been updated recently so that it outputs summary differently?

Thank you!

agemagician commented 2 years ago

Hi,

We didn't update/change the model. However, the transformers library code changed which is now producing different results. To get the same results you need to install an older version of the transformers library:

!pip install -q -U transformers==4.1.0 sentencepiece