-
Notifications
You must be signed in to change notification settings - Fork 17
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
bug in generating data #4
Comments
Hi! |
But this is inconsistent with the comments on lines 87 to 104 """
Handles training / evaluation on long ASTs by splitting
them into smaller ASTs of length max_len, with a sliding
window of max_len / 2.
Example: for an AST ast with length 1700, and max_len = 1000,
the output will be:
[[ast[0:1000], 0], [ast[500:1500], 1000], [ast[700:1700], 1500]]
Input:
ast : List[Dictionary]
List of nodes in pre-order traversal.
max_len : int
Output:
aug_asts : List[List[List, int]]
List of (ast, beginning idx of unseen nodes)
""" Also inconsistent with lines 114 to 115 idx = max_len - (len(ast) - (i + half_len))
aug_asts.append([ast[-max_len:], idx]) |
Oh, I see, there is seem to be an issue with the comment. The function's intent is here https://github.com/facebookresearch/code-prediction-transformer#splitting-large-trees The function seems to be correct, also it does not follow he comments on lines 87 to 104: 0, 250, 478 values denote the start of the token block for which we make a prediction. |
get it, thanks! |
I think line 112 (in function
separate_dps
) of cc/main/src/utils/utils.py should beinstead of
The text was updated successfully, but these errors were encountered: