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

Questions about the inputs for getting embeddings #204

Closed
rongqipan opened this issue Dec 25, 2022 · 2 comments
Closed

Questions about the inputs for getting embeddings #204

rongqipan opened this issue Dec 25, 2022 · 2 comments

Comments

@rongqipan
Copy link

Hi,

Thanks for your work.
I tried to use CodeBERT, GraphCodeBERT and UnixCoder to extract Java code embeddings.
However, for inputs to the models, I only used the Java source code, something like [CLS][JavaCode][SEP].

  1. Should I also add comments to the inputs?
  2. For GraphCodeBERT and UnixCoder, should I also add dataflow and also the flattened AST as input? Since I care about the execution time of the approach, so would adding that information (Comments, Dataflow and AST) make the time for getting embeddings much longer?

I would appreciate your kind suggestions,

Thanks.

@guoday
Copy link
Contributor

guoday commented Jan 9, 2023

  1. It's better to add comments
  2. You don't need to add dataflow or the flattened AST as input. The original code is enough. If you want to extract code embedding, I suggest you use UniXcoder which I test better on most datasets.

@rongqipan
Copy link
Author

Thanks for your reply and kind suggestions : )

@celbree celbree closed this as completed Feb 20, 2023
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