Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help running Jupyter #131

Closed
philipturner opened this issue Dec 16, 2021 · 4 comments
Closed

Help running Jupyter #131

philipturner opened this issue Dec 16, 2021 · 4 comments

Comments

@philipturner
Copy link
Contributor

I am trying to resurrect Swift for TensorFlow, and side-loading Swift on Google Colab is vital to that effort. Running on Google Colab presents several challenges, so I need to run a Jupyter notebook successfully on my Mac first. I set up Docker, but running Swift on Jupyter produces errors I cannot work around.

I followed the instructions for option 3 on the README. Options 1 and 2 are not viable, as building Swift from source is extremely time-consuming. Furthermore, the new kernel must be independent from the TensorFlow toolchain.

I tried setting it up with the kernel gateway (option 4) but kept receiving this error. I assume it’s because the necessary image was removed from Docker Hub:

Screen Shot 2021-12-16 at 1 01 20 PM

Using option 3 instead, I created a blank Swift Jupyter notebook that executes print("hello world"). I ran the code cell and nothing appeared as output. Instead, the terminal logged the errors shown below. After switching the kernel from Swift to Python 3, it worked just fine. The bug happened on both a fresh Docker image and one I modified heavily:

Screen Shot 2021-12-16 at 1 06 47 PM

I need to isolate this error from the Swift for TensorFlow toolchain. To start off, I will find a vanilla Ubuntu Docker image and install the Swift 5.5 release toolchain. Then, I will get the Swift REPL running.

Your Docker image automatically downloads an S4TF toolchain, so I assume its code won’t work with an Apple toolchain. My only option is to reconstruct your repository file by file on top of an Apple toolchain. Furthermore, REPL isn’t supported with the TensorFlow toolchain:

Screen Shot 2021-12-16 at 2 27 58 PM

When you made the Swift Jupyter kernel, you started out from scratch and gradually built what you have now. Could you point me toward the first file you added, so I can start off by testing that? Then, in what order should I add the other files to reconstruct the entire repository?

The new Swift for TensorFlow won’t need a special Swift toolchain. It will run as a Swift package on top of the release toolchain, allowing it to run on iOS. Is it possible to remove everything related to TensorFlow from the Jupyter kernel? I understand that I may need to add some files back in to get it to run on Colab.

Using an Apple silicon Mac could be the cause of the bug. I have a 2018 Intel Mac mini as well. Do you recommend that I try to reproduce the bug on the mini?

@philipturner

This comment was marked as spam.

@philipturner

This comment was marked as spam.

@philipturner

This comment was marked as spam.

@philipturner
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant