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

Fined-tuned checkpoints -> Code clone detection #55

Closed
Chinmayrane16 opened this issue Jun 24, 2022 · 3 comments
Closed

Fined-tuned checkpoints -> Code clone detection #55

Chinmayrane16 opened this issue Jun 24, 2022 · 3 comments

Comments

@Chinmayrane16
Copy link

Hi,

I am hoping to reproduce the results on code clone detection task.
This might seem like a silly question but the fined-tuned checkpoints released doesn't include the RobertaClassificationHead parameters, right?
I am able to load only the T5ForConditionalGeneration model using the provided checkpoints for the task.

So, how do I go about loading the entire CloneModel?

@yuewang-cuhk
Copy link
Contributor

Hi, thanks for pointing out this. We will update this finetuned checkpoint with the RobertaClassificationHead parameters.

@sethun
Copy link

sethun commented Jul 7, 2022

Hi!

Not sure if it is too-early, I downloaded the latest checkpoint (Uploaded an hour ago). Seems there is some-mismatch between ClonedModel's shape and checkpoint's shape

RuntimeError: Error(s) in loading state_dict for CloneModel: size mismatch for encoder.shared.weight: copying a param with shape torch.Size([32000, 768]) from checkpoint, the shape in current model is torch.Size([32100, 768]). size mismatch for encoder.encoder.embed_tokens.weight: copying a param with shape torch.Size([32000, 768]) from checkpoint, the shape in current model is torch.Size([32100, 768]). size mismatch for encoder.decoder.embed_tokens.weight: copying a param with shape torch.Size([32000, 768]) from checkpoint, the shape in current model is torch.Size([32100, 768]). size mismatch for encoder.lm_head.weight: copying a param with shape torch.Size([32000, 768]) from checkpoint, the shape in current model is torch.Size([32100, 768]).

@yuewang-cuhk
Copy link
Contributor

Hi, we just updated this finetuned checkpoint yesterday. You can resolve this via adding this line. Following the instructions here, you will be able to reproduce the results of: [best-f1] test-f1: 0.9500, precision: 0.9526, recall: 0.9474.
This result is different from the reported one in the paper due to that we report micro-f1 instead of macro-f1 following GraphCodeBERT.

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