How to setup EXLA in Elixir?

Please , can someone help with this challenge am having atm.
I installed exla and nx and other ML related deps on ubuntu via wsl.
I followed the EXLA docs to setup, but i keep getting the following;

 GenServer.call(EXLA.Client, {:client, :host, [platform: :host]}, :infinity)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started

Basically my config/config.exs looks like this;

import Config

config :nx, :default_backend, EXLA.Backend

But the app throws the error above anytime it finds EXLA anywhere in my code

Aside the instructions in thier docs is there anything else i must do???

Thanks…

Do you have any startup logs for your app? Maybe there’s something relevant there.
Aside that, how are you installing the libraries? What are the corresponding lines in your deps declaration (either on Mix.install or mix.exs)?

No please , dont have any start up logs, am new to ML on elixir, just trying my hands on the framweworks.

This is my deps

 defp deps do
    [
      # {:dep_from_hexpm, "~> 0.3.0"},
      # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
      {:bumblebee, "~> 0.5.0"},
       {:nx, "~> 0.7.0"},
      {:exla, "~> 0.7.0"},
      {:kino, "~> 0.11.0"},
      {:hnswlib, "~> 0.1.5"},
      {:scidata, "~> 0.1"},
      {:req, "~> 0.4.0"}
    ]
  end

And below is the code which implements EXLA

  trained_model_state =
    model
    |> Axon.Loop.trainer(:categorical_cross_entropy , :adam)
    |> Axon.Loop.run(train_data , %{} , compiler: EXLA , epochs: 5)
    |> IO.inspect

Thanks

How are you running the code? Which command are you using in the shell?

Am using mix run command please.

Try adding Application.ensure_all_started(:exla) ti the top of your script then.

The way you’re running things might not be starting your app and deps trees

2 Likes

Hurray…
It works , thank you very much!!!

1 Like