"Swift" Kernel in Jupyter Notebook Autocompletion?

(Leon Li) #1


I just installed Swift latest build on Ubuntu 18.04LTS with CUDA 10.1 in AWS, and I also installed the google/swift-jupyter registor, so far it all works fine, however, the autocompletion just doesn’t work on my setup, I tested the Python 3 kernel works good, but the “Swift” kernel doesn’t, does anyone meet the same problem because I saw @jeremy’s notebook the autocompletion works great.


(Elias Kunnas) #2


I’ve been digging into the notebooks recently trying to get them to run properly (still a lot of bugs and instability everywhere!).
In this case, swift-jupyter has the following key lines in swift_kernel.py:

# TODO(TF-743): Reenable completion by default.
self.completion_enabled = False

This corresponds to https://bugs.swift.org/projects/TF/issues/TF-743
For some reason my version did not crash when replicating the upstream bug description, so I just changed the boolean to True.

EDIT: It turns out that the latest snapshot versions of Swift for Tensorflow indeed do crash as mentioned. The proper fix did not make it to Swift 5.1 so we’ll have to wait for some time to get the auto-completion back for Jupyter…

1 Like

(Leon Li) #3

I see, thanks Elias, I guess we have to stay turned.


(Sina Moeini) #4

Apparently they fixed it. But you need to install new toolchain and the kernel for Jupiter. Also it might not be enabled by default. You might need to run magic command: %enableCompletion