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

Code-Code CodeCompletion-token not tokenizing all spaces #190

Open
markNZed opened this issue Nov 16, 2024 · 0 comments
Open

Code-Code CodeCompletion-token not tokenizing all spaces #190

markNZed opened this issue Nov 16, 2024 · 0 comments

Comments

@markNZed
Copy link

The code tokval = " ".join(tokval.split()) has the effect of normalizing whitespace. Is this normal for a benchmark intended to measure next token prediction ? Should whitespace be kept to measure the model's ability to predict the next token in "normal" code ? Here is the location in the pre-processing script:

https://github.com/microsoft/CodeXGLUE/blob/ac74a62802a0dd159b3258c78a2df8ad36cdf2b9/Code-Code/CodeCompletion-token/dataset/py150/preprocess.py#L53C17-L53C50

"Line level code completion task shares the train/dev dataset with token level completion" so it might have more impact there - giving overly optimistic results..

Maybe the token should be used in the pre-processing to distinguish between spaces used to separate tokens and spaces in the structure of the code?

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

1 participant