microsoft / CodeBERT

CodeBERT
MIT License
2.25k stars 455 forks source link

Ho wot get output string in Codesearch #60

Closed Moshiii closed 3 years ago

Moshiii commented 3 years ago

Hi,

I am an researched on code retrieval and I want to reproduce your work for research purpose.

I fine-tuned your codesearch model and I run the run_classifier.py to get the test result.

But All I can see are two numbers, where is the generated code? How can I get the code sequence instead of two numbers? image image

Thanks!

guoday commented 3 years ago

This code don't support to return searched code, since the model is to do a binary classification given a nl and code. It's hard to perform code search. But we also implement a Siamese model for code search. Please refer https://github.com/microsoft/CodeBERT/blob/master/GraphCodeBERT/codesearch/README.md#model-and-demo

Moshiii commented 3 years ago

Thanks for the Clarification and Demo link!. It can be a good idea to add a little explanation on the read me file so that other people will not asking this question any more.