`NaiveNASflux` required for loading models but not automatically installed
Closed this issue · 6 comments
The current examples use CompuGraph
to load the ONNX model back into Julia as a function to perform inference/forward passes. This function is provided by NaiveNASflux
but when I used add "https://github.com/DrChainsaw/ONNXmutable.jl"
to install my environment lacked NaiveNASflux
(also see #25).
After using ]add NaiveNASflux
I could load ONNX models.
Examples shown in #26 work with the following environment in Julia 1.5.2:
[c52e3926] Atom v0.12.24
[052768ef] CUDA v1.3.3
[587475ba] Flux v0.11.1
[4c0ca9eb] Gtk v1.1.5
[86fae568] ImageView v0.10.12
[e5e0dc1b] Juno v0.8.4
[eb30cadb] MLDatasets v0.5.2
[85610aed] NaiveNASflux v1.5.0
[cf2a63a0] ONNXmutable v0.1.0 `https://github.com/DrChainsaw/ONNXmutable.jl#master`
[d96e819e] Parameters v0.12.1
[91a5bcdd] Plots v1.7.3
[276daf66] SpecialFunctions v0.10.3
[10745b16] Statistics
Without NaiveNASflux
, ]test ONNXmutable
also starts throwing lots of errors and fails. With NaiveNASflux
installed we get:
Test Summary: | Pass Total
ONNXmutable.jl | 1084 1084
Testing ONNXmutable tests passed
Yes, that is a bit of an issue right now. Technically it is even type piracy as neither CompGraph, String, IO or the protos are defined in this package. I'm thinking of just replacing the import/export API with just save
and load
. Drawback is perhaps that they are common names which might clash when using using ONNXmutable
, but since they are more or less the whole API then it might not be so much of an inconvenience to use import
instead.
I didn't know that the tests fail if run from an environment which does not have NaiveNASflux installed. Thank you so much for pointing it out. I will investigate and fix.
Hmmm, test pass for me in a clean environment (and I don't have NaiveNASflux in my default environment either).
(testonnx) pkg> test ONNXmutable
....
Test Summary: | Pass Total
ONNXmutable.jl | 1084 1084
Testing ONNXmutable tests passed
(testonnx) pkg>
julia> using NaiveNASflux
ERROR: ArgumentError: Package NaiveNASflux not found in current path:
- Run `import Pkg; Pkg.add("NaiveNASflux")` to install the NaiveNASflux package.
Stacktrace:
[1] require(::Module, ::Symbol) at .\loading.jl:893
Interesting. I just confirmed the same re tests passing without NaiveNASflux. Probably I got some other packages mixed in there and screwed something up. Sorry about that.
I don't have an opinion on using
vs. import
.
I just confirmed the same re tests passing without NaiveNASflux.
Great! Let me know if it resurfaces.
I'll leave this open as the core issue still remains and is worthy of a solution. I think I'll just go with load
and save
but I need to think about it some more.
As of version 0.1.0
, the functions used to import/export are now load
and save
.