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 completion for jupyter lab/notebook using StarCoder #378

Closed
wants to merge 78 commits into from

Conversation

liyongsea
Copy link

Implementing #290

In this PR, we re implemented the jupytercoder, a code completion chrome extension for jupyter lab, based on StarCoder. Starcoder is a open source code completion model, specifically tuned on notebooks, which enable it to understand the context of the notebook.

Here is a demo of the expected behavior https://twitter.com/BigCodeProject/status/1654174953565044736

User need to first install the plugin following https://jupyter-ai.readthedocs.io/en/latest/contributors/index.html#development-install

To activate the StarCoder API, user need to provide his huggingface token in the side bar.

@welcome
Copy link

welcome bot commented Sep 3, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@krassowski
Copy link
Member

@liyongsea I am not a maintainer here, but just so that you are aware we started discussing a public API for inline completion in jupyterlab/jupyterlab#14267 (comment). It appears to me that parts of the code, especially around CodeMirror editor customization could be merged upstream in JupyterLab. Would you be open to splitting the implementation between core and here?

@dlqqq
Copy link
Member

dlqqq commented Sep 6, 2023

@krassowski Is there any shared communication medium that we can invite @liyongsea, @Wzixiao and our team to? It seems like the path forward here involves more collaboration than simple GitHub comments allow for. I know that the Jupyter Gitter exists, but is there a Jupyter Slack workspace? Our team uses Slack internally, so using Slack would allow us to respond more promptly. We want to work more closely with our open source contributors, and I believe having a dedicated Slack workspace would be easiest.

@dlqqq
Copy link
Member

dlqqq commented Sep 6, 2023

@liyongsea @Wzixiao Our team is going to take a look at this PR sometime this week. We're working on a few urgent project planning tasks at the moment, so we greatly appreciate your patience. Thank you for the enormous amount of work you all have put into this! 🤗

@liyongsea
Copy link
Author

@liyongsea I am not a maintainer here, but just so that you are aware we started discussing a public API for inline completion in jupyterlab/jupyterlab#14267 (comment). It appears to me that parts of the code, especially around CodeMirror editor customization could be merged upstream in JupyterLab. Would you be open to splitting the implementation between core and here?

We can totally do that. We just need some guideline from your part, so to better organise the codebase.
"is there a Jupyter Slack workspace" We would love to build a more reactive communication channel with you @krassowski

@liyongsea @Wzixiao Our team is going to take a look at this PR sometime this week. We're working on a few urgent project planning tasks at the moment, so we greatly appreciate your patience. Thank you for the enormous amount of work you all have put into this! 🤗

Thank you for reviewing the code !

@krassowski
Copy link
Member

krassowski commented Sep 6, 2023

I don't think there is a Jupyter Slack channel, but it would be convenient channel for me too. We can raise this on meetings this month week to see if there is a wider support for Jupyter-wide workspace and if not just create a temporary channel.

@jtpio
Copy link
Member

jtpio commented Sep 6, 2023

Thanks @liyongsea this is looking very promising!

About where discussion should take place: it would still be very useful and valuable for most of the discussion to happen in this PR (or in other issues / PRs, or on the JupyterLab repo), so the information is not scattered across many places. Especially for those interested in following along (for example by watching the repo).

@liyongsea
Copy link
Author

Thanks @liyongsea this is looking very promising!

About where discussion should take place: it would still be very useful and valuable for most of the discussion to happen in this PR (or in other issues / PRs, or on the JupyterLab repo), so the information is not scattered across many places. Especially for those interested in following along (for example by watching the repo).

I agree with you. In this case, what do you recommand as next steps ? Shall we first split the PR as suggested by @krassowski ? Who will be the key stakeholder for this task, so that we could better understand how to split ?

@jtpio
Copy link
Member

jtpio commented Sep 6, 2023

Shall we first split the PR as suggested by @krassowski ?

Maybe opening an issue on the JupyterLab repo first would be a good first step, if it requires adding a new API there? Or maybe just opening a new PR directly would be fine too.

Depending on how much time it would take to get it in core and then released, maybe implementing everything here in the Jupyter AI repo first could make sense.

@krassowski
Copy link
Member

Maybe opening an issue on the JupyterLab repo first would be a good first step, if it requires adding a new API there?

To avoid splitting discussion we can continue discussion APIs in jupyterlab/jupyterlab#14267

maybe just opening a new PR directly would be fine too.

From my point of view that would work, though bear in mind we may have different opinions on APIs (I suggested extending the completion provider pattern to handle online completions in the linked issue and following the upcoming LSP update as the only standard), and if that's the case, it might be easier to seek consensus before doing further work - really depends on what's easier for you.

@andrii-i andrii-i added the enhancement New feature or request label Sep 8, 2023
@liyongsea
Copy link
Author

closing this PR as there is a new one using a new jupyterlab endpoint #419

@liyongsea liyongsea closed this Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants