Package: jupyterlab-transformers-completer
jupyterlab-transformers-completerInline completion provider usingtransformers.jsfor JupyterLabThis extension is currently aimed for developers of JupyterLab extensions (and advanced JupyterLab users) to explore the proof of concept integration of the new inline completions API slotted for JupyterLab 4.1.All models linked from this demonstration run exclusivelyin your browser, and are:order of magnitudes smaller than the state-of-the-art models,producing correspondingly lower accuracy of suggestions/answers.These models are not vetted for accuracy nor propriety and should not be deployed without further validation.RequirementsJupyterLab >= 4.1.0 (not yet released)A browser supporting:SharedArrayBufferWeb WorkersDynamic import for workers (behinddom.workers.modules.enabledin Firefox)(optional, for faster inference)WebGPU(behinddom.webgpu.enabledin Firefox)jupyter-serverto enable additional headers (jupyverseandjupyterlitenot tested yet)When this extension is enabled, the server will return additional headers,
which will prevent fetching external resources, for example the extension logos
from GitHub will no longer load in the extension panel.The additional headers are used to enable synchronous communication with WebWorker viaSharedArrayBuffer:Cross-Origin-Opener-Policy: same-origin,Cross-Origin-Embedder-Policy: require-corpInstallTo install the extension, execute:pipinstallgit+https://github.com/krassowski/jupyterlab-transformers-completer.git#egg=jupyterlab-transformers-completerUninstallTo remove the extension, execute:pipuninstalljupyterlab-transformers-completerContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the jupyterlab-transformers-completer directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstalljupyterlab-transformers-completerIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink named@jupyterlab/transformers-completerwithin that folder.Packaging the extensionSeeRELEASE