generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Aral's User Study #38
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This request updates the VSC Plugin and adds new respective APIs for a user study on developer interactions with code completions. The JetBrains plugin and its APIs are unaffected. User study data is stored under a new subdirectory
data_aral
.The general motivation behind the modifications proposed in this PR is to more closely resemble the SOTA code-completion tools that continuously generate suggestions; while also preventing the target LLMs from generating suggestions unnecessarily.
Fixes
Code4Me
completions at the top.'auto'
instead of manual).snake_case
convention, as they are going to be used in data analysis anyway.language
field determined usingvsc
API instead of file extension.splitTextAtCursor
was flaky like 20% of the time, placing one fewer character in the prefix because it was using global position & document (which may not be perfectly synchronised with when theprovideCompletionItems
method is called).Adds
Tracks manual invocations.
New
idle
invocation type, after the user has not interacted for 2s. Completions are not shown if none are received (as opposed to IntelliSense's defaultNo Completions
indicator).If a completion is generated while the user is still typing, we try to match the last few characters with the completion so they are not duplicated.
Stores time a suggestion is displayed, and accepted.
Explicitly receives and sends the models, so the model that generated an accepted completion can be retrieved deterministically even if the completion is the same as another model. Also shows the model to the user when they press
⌃Space
again.The context for completions is always stored in the user study. ReadMe is updated to reflect that developers who use the tool, agree to these terms.
Server-side filter for rejecting completions likely to be ignored or useless to the user. The user is assigned one of four filters for a session (where two completions are no more than 30 minutes apart). The filters are:
CodeBERTa
model fine-tuned on the code context surrounding the cursor.JonBERTa
models (custom architecture) leveraging both telemetry and code context.Option for testing deployment locally. Run
flask app
with env variablesCODE4ME_TEST=true
andCODEGPT_CHECKPOINT_PATH
set to a model from HF (e.g.'microsoft/CodeGPT-small-py'
).Todos
Server-side
code4me-server/api.py > autocomplete
because it requires globbing a directory with >1M files on every completion request. Consider sorting completions under user-hash subdirectories as a more scalable approach.datasets
generator.Client-side (
vsc
)vsc
ground-truth-tracking. MRE: Call completion on line 3, then delete line 3; results in trackinglineNumber=1
.