Hi, I could not compile dependency :axon_onnx :
Mix.install([
{:axon, "~> 0.5"},
{:nx, "~> 0.5"},
{:exla, "~> 0.5"},
{:stb_image, "~> 0.6"},
{:kino, "~> 0.8"},
{:axon_onnx, "~> 0.4"},
])
I’ve got error :
Compiling 28 files (.ex)
== Compilation error in file lib/axon_onnx/shared.ex ==
** (CompileError) lib/axon_onnx/shared.ex:58: undefined function transform/2 (there is no such import)
(nx 0.7.2) lib/nx/defn/compiler.ex:832: Nx.Defn.Compiler.compile_error!/3
(nx 0.7.2) lib/nx/defn/compiler.ex:429: Nx.Defn.Compiler.normalize/2
(elixir 1.15.7) lib/enum.ex:1819: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.15.7) lib/enum.ex:1819: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(nx 0.7.2) lib/nx/defn/compiler.ex:422: Nx.Defn.Compiler.normalize/2
(elixir 1.15.7) lib/enum.ex:1819: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.15.7) lib/enum.ex:1819: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(nx 0.7.2) lib/nx/defn/compiler.ex:422: Nx.Defn.Compiler.normalize/2
Thanks in advance for help.
4 Likes
{:axon_onnx, github: "elixir-nx/axon_onnx"}
Will get you un-blocked as a workaround
3 Likes
f0rest8
November 22, 2024, 5:18pm
3
Just a note that this error still exists and I was wondering if anyone knew if work is being shifted away from axon_onnx to ortex or another avenue? These are incredible libraries, and my question is out of curiosity rather than critique.
2 Likes
master ← blasphemetheus:support-nx-0.10
opened 05:04AM - 18 Jan 26 UTC
## Summary
Widen version constraints to support newer Nx and Axon releases.… The existing code (using `deftransformp`) compiles and works fine with Nx 0.10 - only the version constraints in mix.exs were blocking compatibility.
## Changes
- `nx`: `~> 0.5` → `~> 0.5 or ~> 0.6 or ~> 0.7 or ~> 0.8 or ~> 0.9 or ~> 0.10`
- `axon`: `~> 0.5` → `~> 0.5 or ~> 0.6 or ~> 0.7 or ~> 0.8`
- `exla`: `~> 0.5` → `~> 0.5 or ... or ~> 0.10` (test only)
- `req`: `~> 0.1.0` → `~> 0.3 or ~> 0.4 or ~> 0.5` (test only, needed for nimble_pool compatibility)
- Version bump: `0.4.0` → `0.5.0`
## Testing
Verified compilation with:
- Nx 0.10.0
- Axon 0.8.0
- EXLA 0.10.0
## Related
Fixes: https://elixirforum.com/t/error-using-axononnx-v0-4-0-undefined-function-transform-2/63326
Submitted a PR widening version constraints
Sidenote: transform was replaced by `deftransform` which works roughly the same but with better ergonomics