LiveBook: Errors when running neural network tasks

Hey!

I have a few weird issues when running neural network tasks in LiveBook.

First, when I try to add a Neural Network task smart cell, it prompts me to install kino_bumblebee and exla.

Mix.install(
  [
    {:kino_bumblebee, "~> 0.5.0"},
    {:exla, ">= 0.0.0"}
  ],
  config: [nx: [default_backend: EXLA.Backend]]
)

This installation fails with:

** (Mix.Error) Could not compile with “make” (exit status: 2).
You need to have gcc and make installed. Try running the
commands “gcc --version” and / or “make --version”. If these programs
are not installed, you will be prompted to install them.

I’ve already located these issues:

But none of the information in there helped me.

I am running the standalone LiveBook application on macOS (M1). I downloaded LiveBook from the website. I also tried installing it via brew, but I got the same error.

If I downgrade kino_bumblebee to ~> 0.4.0 or exla to ~> 0.7.0 the installation succeeds.

My next problem is the execution of the neural network task. I tried both text generation and Text-to-Speech, but the tasks fail as soon as I try to run them by clicking “Run”. I get a Runtime terminated unexpectedly - no connection flash massage in the top-right corner and my runtime disconnects and nothing happens…

I tried another device that still had LiveBook 0.12.1 installed, which runs Elixir v1.15.7. Unfortunately, I face the same error.

I also tried downgrading LiveBook to 0.14.7. Same error.

How can I debug the error further?

Are you sure you have enough resources to do that? The error could point to the fact that the OS killed the runtime.

I think so. It fails immediately without any delay as soon as I click “Run”. LiveBook says that I have 18 GB of Memory available so I don’t think it is a problem of resources.

1 Like

Running LiveBook in a Docker container resolves the issues, which suggests that there is a problem on my end :upside_down_face: