axon
axon copied to clipboard
(FunctionClauseError) no function clause matching in Nx.BinaryBackend.to_binary/1
Trying out the example in https://github.com/elixir-nx/axon/blob/main/examples/generative/text_generator.exs
throws the error (FunctionClauseError) no function clause matching in Nx.BinaryBackend.to_binary/1
Attempted function clauses (showing 1 out of 1):
defp to_binary(%Nx.Tensor{data: %{state: data}})
(nx 0.5.3) lib/nx/binary_backend.ex:183: Nx.BinaryBackend.to_binary/1
(nx 0.5.3) lib/nx/binary_backend.ex:1937: Nx.BinaryBackend.put_slice/5
(nx 0.5.3) lib/nx/defn/evaluator.ex:418: Nx.Defn.Evaluator.eval_apply/4
(nx 0.5.3) lib/nx/defn/evaluator.ex:239: Nx.Defn.Evaluator.eval/3
(elixir 1.14.2) lib/enum.ex:1780: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.14.2) lib/enum.ex:1780: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(nx 0.5.3) lib/nx/container.ex:110: Nx.Container.Tuple.traverse/3
#cell:rqzh2mse3mmtoh3y6bqigdl75hg64c5e:1: (file)
Uses
Mix.install([
{:axon, "~> 0.5"},
{:nx, "~> 0.5.3"},
{:exla, "~> 0.5"},
{:req, "~> 0.3.3"}
])
Please check your Mix.install logs to ensure the dependency installation worked properly
Ok, so I tried to run this locally and it worked. I recommend:
- double checking that you're on latest Axon main
- Ensuring the libs were properly installed (it might be useful to add
force: trueto Mix.install to ensure you're actually getting the latest patch for each lib) - If all still fails, it would be better to share either here or in a linked gist all of the command's output.
@vishal-h were you able to get this working?
I got distracted with office work. Let me try again and revert.