-
Notifications
You must be signed in to change notification settings - Fork 18
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
Passing in new java source code snippets to get predictions #109
Comments
Hi! First of all, you need to extract paths from the code snippet. This should be done by the tool you used for model training. After that, you should write a little wrapper to pass your datapoint into the model. Look into an example from readme for correct model loading. Pass your example into the model according to forward method signature. |
Hi @SpirinEgor, thanks for responding ! |
What dataset did you download? The tool I was speaking about is a tool for extracting paths from AST of code. There are some different ways to do it: All these tools use different parsers therefore they build different ASTs and extract different paths. |
hello, i'm doing same thing with my own python ast miner thank you! |
It seems that there are correct steps. Could you provide more information:
Also, the model was trained with masked method names, so you should replace them too in your example. As far as I remember, mask token in def <MN>(n):
if n == 0:
return 1
else:
return n * <MN>(n-1) Output shape is
|
seems that i've made a silly mistake on decoding.. thank you for your help! thanks again! |
Awesome! |
How can we pass in a single snippet of java code as string into the model and get a comment generated from the model, for example, what are the preprocessing steps involved?
The text was updated successfully, but these errors were encountered: