caicloud / ciao

Kernel for Kubeflow in Jupyter Notebook
Apache License 2.0
67 stars 18 forks source link

[discussion] Why do we need a kernel to do this instead of some cell magics? #57

Closed liudongqing closed 5 years ago

liudongqing commented 5 years ago

I am wondering whether it is too heavy to implement a kernel to do tensorflow job? My understanding is that we can use a cell magic to achieve similar result: send the code to kubeflow and get back the logs.

Am I miss something? Thanks!

gaocegege commented 5 years ago

From the user level, we do just need some magic commands. But the magic commands are supported from the kernel, e.g. ipython or ir. Thus if we need to add magic commands, we could:

I think maintaining a fork is not what we want, thus we decided to implement a kernel. But there is a problem in this way: How to run the python code natively, not via kubeflow.

To solve the problem, we use sos-kernel to support multiple kernels in one notebook. We have a demo for it:

You can select kernel in the right top sidebar of the cell. And run different cells using different kernels.

gaocegege commented 5 years ago

If you have any idea about it, we can discuss it here. Ciao is experimental now and welcome breaking changes :smile:

gaocegege commented 5 years ago

/close