hpi-swa / ipolyglot Goto Github PK
View Code? Open in Web Editor NEWA polyglot kernel for Jupyter notebooks based on GraalVM.
License: Other
A polyglot kernel for Jupyter notebooks based on GraalVM.
License: Other
We want to check if the kernel setup within GraalVM works; to do that, we connect a Jupyter notebook frontend to the kernel and test common functionality.
Using jp-kernel try running polyglot code in GraalVM.
The script installing the polyglot kernel is still called ijsinstall
; let's rename the file and the references to it.
Errors are returned inconsistently depending on the language used in the kernel cell.
Consistent and useful error messages are desired.
Our basic approach to inform to kernel which language a notebook cell is using will be to use magic commands. If time permits we want to be able to detect the language automatically.
For best UX, users should not have to deal with exporting and importing variables explicitly using the polyglot API provided in GraalVM.
Instead, in some way (that has to be determined yet) we want to deliver a way to import and export variables for each notebook cell.
Ideas include:
Introducing a global bindings object that can be accessed from all cells.
Introducing several bindings objects (one for each language) that can be accessed from each cell. (This would be more explicit in mentioning the origin of each variable.)
So that we don't need to set flags --polyglot --jvm
in submodules
As a basis for our IPolyglot Jupyter kernel we want to use IJavaScript.
As a first step, we want to run the kernel in GraalVM.
It seems to make sense to have #4 done as a prerequisite so that the programming language is known. Then, depending on the programming language, set the character sequence appended to the beginning of a line (e.g. //
or #
) according to the programming language. This sequence should be added automatically when hitting cmd + / in the Jupyter Notebook. We might be able to set this in the kernelspec?
We've access to a VM now, set up a jupyter notebook server there.
While attempting to utilize ipolyglot via the docker instance, I got this error from Step #2: docker build --tag=ipolyglot .
Error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `patch-package && ./bin/ipolyglotinstall.js --spec-path=full`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
The full output can be found in this gist
I was able to reproduce this three times in a row.
OSX 10.13.6
Docker Desktop: 2.3.0.3
Docker Engine: 19.03.8
in setJupyterInfoAsync you parse version just executing "jupyter --version" and call
context.frontend.version = stdout.toString().trim(); context.frontend.majorVersion = parseInt( context.frontend.version.split(".")[0] );
But output like that cause error
$ jupyter --version
jupyter core : 4.6.1
jupyter-notebook : 6.0.2
qtconsole : 4.6.0
ipython : 7.9.0
ipykernel : 5.1.3
jupyter client : 5.3.4
jupyter lab : 1.2.3
nbconvert : 5.6.1
ipywidgets : 7.5.1
nbformat : 4.4.0
traitlets : 4.3.3
We want to improv devX by providing an inspector view element to observe the state of the bindings variable used to share state between notebook cells.
If we can use JuypterLab instead, we may use this for our planned frontend extensions and meta data passing.
Syntax highlighting is an important aspect of user experience. We want to introduce syntax highlighting in the notebook frontend for supported languages.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.