I just finished watching Deep Learning from the Foundations and was excited to try out Swift for Tensorflow. I now it’s early days, but so far I’m having a bad experience in getting it up and running. I’ve tried:
b) Running the ToolChain (0.4 Release) on Xcode (10.2.1 and 11.0 beta) Playground MacOS 10.14
I get an error saying the toolchain is not compatible, but it does find the Tensorflow module.
FIX :run on the command line: export TOOLCHAINS=com.google.swift.20190627
c) Running the jupyter-swift-notebook docker on my Ubuntu (https://github.com/google/swift-jupyter)
A simple print(“hello world”) inside the notebook gives me the
“Exception: Expected value from Int.bitWidth, but got: SuccessWithoutValue()”
FIX: run the docker with the --privileged option: docker run -p 8888:8888 --privileged -v /home/ale/notebooks:/notebooks swift-jupyter
On the mac I was trying to get it running on the Playgrounds. But just tried setting the command line and I get the error:
$ swift error: failed to launch REPL process: process exited with status -1 (Error 1)
If I revert to XCode 10.2 command line it works normally
Welcome to Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.4).
Type :help for assistance.
So if you’ve done what I mentioned in my other post, that is, making sure the command line tools are using XCode 11 Beta and you’ve installed the v0.4.0-rc0 June 27, 2019 version of the toolchain from https://github.com/tensorflow/swift/blob/master/Installation.md then on the command line execute the following command:
Then try running swift again and this should be the versions. Hope it helps.
For anybody interested, for option C) I was able to get the Docker running after asking for help on the Swift forums, by instead of using the repository instructions:
$ docker run -p 8888:8888 --cap-add SYS_PTRACE -v /my/host/notebooks:/notebooks swift-jupyter
I used the —privileged option
$ docker run -p 8888:8888 --privileged -v /my/host/notebooks:/notebooks swift-jupyter