richgal

richgal

Hi All,

I run my training model in livebook. In case I would like to train the same model several times with an, the output sometime become useless. I try to save the model in CubDB.

Do you have any suggestion what can be the issue? The result is usually get returned and saved correctly like 1/3 of the tries.

I’m trying to do something like this.

models_list =
Enum.to_list(1..3)
|> Enum.map(fn _ ->
    SetRuns.setrun(dataset.set1, "set1", {tensor_to_check, signals_to_check})
end)

Enum.map(models_list, fn {trained_model, dataset_name, precision} -> CubDB.put(:models_db, {"#{dataset_name}-precision", precision}, trained_model) end)
%{
  "dense_0" => %{
    "bias" => #Inspect.Error<
  got RuntimeError with message:

      """
      Unable to get buffer.
      """

  while inspecting:

      %{
        data: %EXLA.Backend{
          buffer: %EXLA.DeviceBuffer{
            ref: #Reference<27390.3598233730.3040477197.22534>,
            client_name: :host,
            device_id: 0,
            shape: %EXLA.Shape{
              ref: #Reference<27390.3598233730.2166226945.215890>,
              dims: {12},
              dtype: {:f, 32}
            }
          }
        },
        type: {:f, 32},
        names: [nil],
        __struct__: Nx.Tensor,
        vectorized_axes: [],
        shape: {12}
      }

  Stacktrace:

    (exla 0.6.4) lib/exla/device_buffer.ex:55: EXLA.DeviceBuffer.unwrap!/1
    (exla 0.6.4) lib/exla/backend.ex:133: EXLA.Backend.inspect/2
    (nx 0.6.4) lib/nx/tensor.ex:241: Inspect.Nx.Tensor.inspect/2
    (elixir 1.15.7) lib/inspect/algebra.ex:348: Inspect.Algebra.to_doc/2
    (elixir 1.15.7) lib/inspect.ex:329: Inspect.Map.to_assoc/3
    (elixir 1.15.7) lib/inspect/algebra.ex:479: Inspect.Algebra.container_each/6
    (elixir 1.15.7) lib/inspect/algebra.ex:456: Inspect.Algebra.container_doc/6
    (elixir 1.15.7) lib/inspect.ex:329: Inspect.Map.to_assoc/3

>,

Showing Posts 1 to 1

richgal

richgal OP

Nx.serialize(trained_model)

Solved the issue

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
csmr
Hi all, I’m new here and would like to hear peoples views on my Elixir/Phoenix based game-engine! :smiley: Mutonex gamedesign was finish...
New
Stef-Verniers
Hello I’ve been coding in Elixir for almost two years now because of my current job where we implemented Elixir in our application. But ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews