This is an issue with Swift-Jupyter, but it doesn’t seem to be a breaking incompatibility…unless it relates to the issue I’ve been having with Python interoperability…
I’ve addressed this in the latest update to my Medium post, which contains other updates, too. Guess I should’ve waited to publish until after I had tested out more than the first *.ipynb…
The conda instruction you reference above was a copy-paste error. But it turns out that adding those libraries doesn’t help you. I’ve added another step to the setup in my post that addresses the issue of getting GPU functionality.
Finally - back to the Python interoperability issue - I’ve been unsuccessful in getting Python imports to work. I think it’s somehow stemming from the following: in python_interoperability.ipynb, the call import Python imports Python2.7 instead of Python3.6.
I didn’t use the requirements.txt - I don’t like that it pins all those specific versions. I don’t think it’s a good approach. IIRC I already had all the prereqs in a standard fastai conda environment.
@saeta Perhaps you could update the install docs to remove these issues:
PYTHON_LIBRARY env var
conda env approach
Remove pinned versions from requirements.txt
Whilst pinned requirements are great for production situations, they can be troublesome for folks looking to use current versions of stuff and to use their existing environments where possible. In this case, my existing env worked fine without any of the pinned versions, which is handy since I didn’t have to set up my notebook configuration again, and I can easily switch between kernels.
This got me on the right track. I now have Swift-Jupyter working via a streamlined approach using conda, as described in my reply to the other thread: How to Set Up Jupyter Notebooks for S4TF on Docker
I can remove all the pinned versions from requirements.txt, and add a section about how to install using conda!
Not sure what you mean by the “PYTHON_LIBARY env var” issue. Do you mean that we should suggest adding "–swift-python-library " to the “register.py” command in the install instructions, like neuradai does in his medium post? That’s the only PYTHON_LIBRARY env var related thing I see in this thread.
A few weeks ago I had to set the PYTHON_LIBRARY env var to get py3.7 working. But I suspect --swift-python-library didn’t exist at that point so perhaps my info is out of date.
I am a little confused I have swift notebooks set up except that I have an issue.
To try out my installation s4tf I have cloned from git hub the tutorial directory in which there are several notebooks I have opened two of these
A Swift Tour
and
custom_differentiation
In the first notebook the first code cell works but the second and third fail with a syntax error
see these images
First cell
print(“Hello world!”)
second cell
var myVariable = 42
myVariable = 50
let myConstant = 42
File “”, line 1
var myVariable = 42
Syntax error: invalid syntax
Where to find a debugger for swift notebooks!!!. Thanks. I tried with the ipython debugger but it failed on the import syntax also swift uses the lldb debugger.
stiijn
In an earlier post I had the same intentions, however I was advised in a reply not to persist with 16.04 as the releases does not get updated as frequent as the 18.04 releases. When I was looking at this 16.04 was a Jan 1st release and 18.04 was more than a month later. On the basis of this I updated to 18.04.
It’s easy to mix them up but the downloads for Swift and S4TF are different packages.
The one you can get from Swift.org is for regular Swift, which supports 16.04 just fine. The S4TF builds appear to favor 18.04 (although I guess you could build it yourself for 16.04?).
Hi! I have been studying Tensorflow lite, I found it quite interesting. Especially if you have to use edge devices like raspberry pi 3. However, the code should be written in c++ which is not what I wanted to do. Lately I am quite a lazy guy.
Yesterday I came across into TF lite experiments in Swift. What do you think about? could rPi3 + Swift + TFLite + (hopefully) FastAi be a viable way ?? Thanks